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

コマンドプロンプトのcdコマンドでDドライブに移動するには?

Last updated at Posted at 2019-11-14

はじめに

ふと、コマンドプロンプトでcdするときにDドライブに移動したことなかったなと思って調べてみました。

使用ツール

  • コマンドプロンプト

何も考えずにやってみた

ユーザディレクトリからDドライブ直下に移動してみます。

C:\Users>cd D:\

C:\Users>

移動できませんでした。

調べてから再チャレンジ

こちらを参考にして再チャレンジしてみましょう。

C:\Users>D:

D:\>

移動できました。

そのほかのやり方

dスイッチ

C:\Users>cd /d D:

D:\>

正直D:のほうがシンプルだし、dスイッチ使う意味がよくわからないな。

pushdコマンド

C:\Users>pushd D:\

D:\>

こちらはpopdコマンドを使用することで元のフォルダに戻れるとのことです。
パス通さないと使えないみたいですけど。

D:\>popd

C:\Users>

参考サイト

コマンドプロンプトでDドライブに移動する

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