LoginSignup
2
2

More than 5 years have passed since last update.

コマンドプロンプトでよく使うコマンド

Posted at

よく使うコマンド

windowsのファイル操作のコマンドについてまとめます。

エクスプローラーを開く

start .

フォルダの作成

mkdir aaa\bbb\ccc

空ファイルの作成

copy nul a.txt

ファイルのコピー

copy a.txt b.txt

名前の変更

move a.txt b.txt

ファイルの削除

del b.txt

ファイルの移動

move a.txt aaa

ファイルの結合

copy *.txt a.txt

copyコマンドは、複数のファイルを一つのファイルにすることができます。この場合は、拡張子txtのファイルを、a.txtに出力します。

ファイル一覧の作成

dir /b/a-d/s

dirに引数を指定すると、フォルダ内のファイル一覧をフルパスで取得できます。

結果をファイルに保存する ( 上書き )

dir /b/a-d/s > a.txt

「> 」が、出力の記号で、「a.txt」がファイル名になります。

結果をファイルに保存する ( 追記 )

dir /b/a-d/s >> a.txt

「>> 」が、上書きの記号で、「a.txt」がファイル名になります。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2