从 Windows 上的命令提示符打开位于 google 文件流驱动器中的文件

Chu*_*uox 2 windows cmd python-3.x google-drive-api

我目前正在从 Spyder IDE 运行位于 Google Drive 文件流上的脚本,没有问题,但正在寻找从 anaconda promt 运行的脚本。当我尝试:

cd  G:\My Drive\LBTC API\V0.2
Run Code Online (Sandbox Code Playgroud)

它根本没有做任何事情,如果我尝试,我得到了相同的结果:

cd  G:\
Run Code Online (Sandbox Code Playgroud)

谢谢

asc*_*pfl 7

cd命令(或chdir)改变给定驱动器的当前目录,但不改变当前驱动器:

rem /* This changes the current directory of drive `G:` to `\My Drive\LBTC API\V0.2`,
rem    but if you are on another drive, say `C:`, you will not notice a change: */
cd "G:\My Drive\LBTC API\V0.2"
rem // When you change to the drive `G:` you will see the effect of the `cd` command:
G:
Run Code Online (Sandbox Code Playgroud)

要更改驱动器以及您必须指定的/D选项:

rem // This changes to the drive `G:` and changes its current directory:
cd /D "G:\My Drive\LBTC API\V0.2"
Run Code Online (Sandbox Code Playgroud)

实际上cd命令不需要路径周围的引号,但我也倾向于在此处使用它们,因为它们不会造成伤害,并且在许多其他情况下路径需要它们。