批处理文件 - 在目录路径中返回两个步骤 [英] Batch File - going back two steps in a directory path

查看:133
本文介绍了批处理文件 - 在目录路径中返回两个步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在路径上创建批处理文件

I am creating a batch file i am on a path

C:\Validation\docs\chm

我想回到

C:\Validation part 


这是由用户输入,但是当我写

which is in %DialogPath% This was entered by the user but when i write

CD /D %DialogPath%

出现错误,表示此路径不存在

An error occurs that tells this path does not exists

推荐答案

您的问题的直接回答是

cd ..\..

cd / DC:\Validation

使用变量比then命令更可能出现问题。

The problem is more likely with the variable than then command.

这篇关于批处理文件 - 在目录路径中返回两个步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆