此批处理命令有助于更改其他目录或显示当前目录。
cd
以下示例显示了如何以多种方式使用cd命令。
链接:https://www.learnfk.comhttps://www.learnfk.com/batch-script/batch-script-cd.html
来源:LearnFk无涯教程网
@echo off Rem The cd without any parameters is used to display the current working directory cd Rem Changing the path to Program Files cd\Program Files cd Rem Changing the path to Program Files cd %USERPROFILE% cd Rem Changing to the parent directory cd.. cd Rem Changing to the parent directory two levels up cd..\.. cd
更改到各个文件夹位置后,以上命令将显示以下输出。
C:\Users\Administrator C:\Program Files C:\Users\Administrator C:\Users C:\
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)