2
1

More than 1 year has passed since last update.

【Windows】コマンドプロンプト 基本コマンド一覧

Posted at

経緯

最近Windows での作業が増えたのですが、CLIでの操作時にLinuxコマンドと混ざることがあり作業に時間がかかってしまいました、復習も兼ねて備忘録として記事にします。

基本コマンド一覧

cd - ディレクトリの移動

使用法: cd ディレクトリのパス

cd C:\\Users\\YourUsername\\Documents

dir - ディレクトリ内のファイルとフォルダの一覧表示

使用法: dir

dir

mkdir - ディレクトリの作成

使用法: mkdir 新しいディレクトリ名

mkdir NewFolder

copy - ファイルのコピー

使用法: copy 元のファイルのパス コピー先のパス

copy C:\\Path\\to\\file.txt D:\\Backup\\file.txt

del - ファイルの削除

使用法: del ファイルのパス

del C:\\Path\\to\\file.txt

rmdir - ディレクトリの削除

使用法: rmdir /s ディレクトリのパス

rmdir /s C:\\Path\\to\\Directory

ren - ファイル名またはディレクトリ名の変更

使用法: ren 元の名前 新しい名前

ren oldfile.txt newfile.txt

type - ファイルの内容表示

使用法: type ファイルのパス

type C:\\Path\\to\\file.txt

doskey /h - コマンド履歴の表示

使用法: doskey /h

doskey /h

cls - 画面をクリア

cls

exit - コマンドプロンプトを終了

exit

まとめ

自分は主にLinuxでのコマンド操作をしていた為、Windows のコマンドプロンプトで作業をする際よく「is not recognized as」を目にしていました(笑)
毎回作業する際に検索するのは大変なので備忘録にできてよかったです。

以上!

2
1
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
1