0

嗨,我想执行cd C:\ iwatch \ trunk \ CPCE客户端\ EfileServiceClient命令使用变量pls帮助我与下面的变量。visual studio命令提示字符串concatation

我将这个批处理文件保存在C:\ iwatch \ trunk文件夹中,因此launchdir变量具有文件夹名称。

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" 
    Echo OFF 
    set "var1=cd" 
    set "var2=Client\EfileServiceClient" 
    Echo Launchdir: "%~dp0" 
    Echo Currentdir: "%CD%" 
    set "var3=%cd% Launchdir%var2% 
    Echo %var3% 
    svcutil http://localhost:19012/EfileService/EfileService.svc 

执行上面的批处理文件的代理文件生成℃之后:\ IWATCH \行李箱文件夹,但我要生成用C这些文件:\ IWATCH \干线\ CPCE客户端\ EfileServiceClient文件夹...

回答

0

示例脚本可以帮助您。

@echo off 
echo.CD=%CD% 
mkdir "New Folder" 
set var2="New Folder" 
cd %~dp0%var2% 
echo.CD=%CD% 
pause 

在你的情况设置VAR2到CPCE Client\EfileServiceClient然后cd %~dp0%var2%。希望这个帮助!

相关问题