1
2

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のコマンドプロンプト(bat)で特定フォルダーを開いた状態でエクスプローラーを開く

Last updated at Posted at 2023-07-24

やり方

スタートアップ開くサンプル
rem スタートアップ開く
start explorer "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
  • フォルダーパスによっては start だけだとエクスプローラーが開かない場合があります。
    なので、 start explorer としています。
  • パス内にスペースがあると動作しないのでパスはダブルクオテーションで囲んでいます。

蛇足

単純な処理ですが、PCを20台、50台…とまわって作業する時は、積もり積もってかなりな作業量になります。
こういう『ぷちbat』のノウハウがあると便利です。

batをメモ帳で編集した際、2バイト文字列が一つも含まれていないと、UTF-8で保存されてしまうことがあります。
なので、batファイルには rem で日本語(2バイト文字列)のコメントを入れるようにしてます。

参考サイトさん

バージョン

Windows 10 Pro 22H2 19045.3208

1
2
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?