小编Dan*_*lii的帖子

将批处理输出重定向到 cd 命令

我有一个输出路径的批处理文件。如何使用Windows cmd中的批处理文件更改当前目录?

我尝试过什么:

F:\>cd my-path.bat
The system cannot find the path specified.

F:\>cd (my-path.bat)
The system cannot find the path specified.

F:\>my-path.bat | cd
F:\
The process tried to write to a nonexistent pipe.
Run Code Online (Sandbox Code Playgroud)

my-path.bat 内容:

@ECHO OFF

@ECHO F:\MyPath\
Run Code Online (Sandbox Code Playgroud)

windows cd batch command-line

1
推荐指数
1
解决办法
1900
查看次数

标签 统计

batch ×1

cd ×1

command-line ×1

windows ×1