使用通配符导航到子目录(窗口)

时间:2013-09-18 16:03:37

标签: windows batch-file cmd

如果我需要使用通配符导航到子文件夹cmd中的命令是什么(不是在PowerShell中)

示例

我当前的目录是c:\ Users \ Test

我有一个子文件夹为3(只有一个文件夹)

我想导航到c:\ Users \ Test \ 3 \ test1

  

C:\用户\试验> cd。\ * \ test1

     

“系统无法找到指定的路径。”

导航命令是什么?

1 个答案:

答案 0 :(得分:1)

试试这个:

for /d /r c:\users\test %%a in (test1) do if exist "%%~a" cd "%%~a"
相关问题