Command prompt won't change directory to another drive

后端 未结 11 2205
你的背包
你的背包 2020-12-04 04:16

I\'m trying to compile some java (learning java currently), and to do so I need to change command-prompt\'s directory (using javac).

C:\\...\\Admin> cd D:         


        
11条回答
  •  独厮守ぢ
    2020-12-04 05:06

    The short answer

    The correct way to go from C:\...\Adminto D:\Docs\Java drive, is the following command :

    cd /d d:\Docs\Java
    

    More details

    If you're somewhere random on your D:\ drive, and you want to go to the root of your drive, you can use this command :

    cd d:\
    

    If you're somewhere random on your D:\ drive, and you want to go to a specific folder on your drive, you can use this command :

    cd d:\Docs\Java
    

    If you're on a different drive, and you want to go to the root of your D:\ drive, you can use this command :

    cd /d d:\
    

    If you're on a different drive, and you want to go to a specific folder on your D: drive, you can use this command :

    cd /d d:\Docs\Java
    

    If you're on a different drive, and you want to go to the last open folder of you D: drive, you can use this command :

    cd /d d:
    

    As a shorthand for cd /d d:, you can also use this command :

    d:
    

提交回复
热议问题