0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windowsのコマンドプロンプトで打ったコマンド履歴取得

Last updated at Posted at 2023-08-15

やり方(表示)

doskey /h

実行結果の例。
image.png
doskey /h 自体も履歴に載ってくる。

やり方(クリップボードへ)

doskey /h | clip

| clip 付ければクリップボードに入ってメモ帳とかにペースト可能。

image.png

作業履歴作成、手順書残す、bat作成、などで便利。

開いているコマンドプロンプト画面で打った履歴のみ

  1. コマンドプロンプト開く。
  2. コマンド打つ。①
  3. コマンドプロンプト画面閉じる。
  4. 再度コマンドプロンプト開く。
  5. doskey /h しても、既に閉じてしまった画面で作業していた分(①)のコマンドは取得できない。

参考サイトさん

バージョン

Microsoft Windows [Version 10.0.19045.3324]

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?