4
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 5 years have passed since last update.

コマンドプロンプトで1つ前のフォルダに戻る

Last updated at Posted at 2013-08-19

Linux のシェルでいうところの cd - みたいなことができないのか調べた。

結論は、全く同じことはできないっぽい。

代替手段としては、 pushdpopd がある。

C:\hoge\fuga\piyo>pushd C:\fizz\buzz

C:\fizz\buzz>popd

C:\hoge\fuga\piyo>

pushd <パス>現在のフォルダを記録して 、<パス>で指定したフォルダに移動する。

pushd の場合は、 cd とは違ってドライブの移動が直にできる。

C:\hoge>pushd D:\fuga

D:\fuga>

複数のフォルダを記録できる。

C:\hoge>pushd C:\fuga

C:\fuga>pushd C:\piyo

C:\piyo>popd

C:\fuga>popd

C:\hoge>

pushd の引数に何も渡さないと、何も記録されない。

C:\hoge>pushd

C:\hoge>cd C:\fuga

C:\fuga>popd

C:\fuga>

使いやすいかどうかは不明。

参考

4
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
4
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?