我正在使用批处理脚本来获取特定项目的最新版本.此脚本仅运行tf.exe并获取某些二进制文件的最新版本.一切正常,但我想将下载文件的属性更改为可写(通过嘲笑这些文件是只读的).为此我想确定文件的本地路径并使用批处理中的attrib-command.
tf.exe workfold [工作区]向我展示了某种列表中的本地路径,但它会更容易,如果它只显示我想要的东西,那么我可以使用提示.到现在为止它看起来像这样:
tf.exe workfold [Workspace]
=======================================
Arbeitsbereich: XYZ-xxxxxx (Username)
Auflistung: TFS-URL
[Workspace]: C:\xxx\TFS\xxx
Run Code Online (Sandbox Code Playgroud)
是否可以仅确定TFS工作区的本地路径映射,以便我可以使用attrib-command的提示而无需解析?
我试图在Windows Azure角色上运行启动任务cmd脚本.
这是命令文件脚本的两行:
powershell $command = "set-executionpolicy Unrestricted"
powershell $command = ".\setupAgent.ps1" -NonInteractive >; out.txt
Run Code Online (Sandbox Code Playgroud)
现在问题是,我从命令shell收到一条错误消息,说:
D:\Users\UserAccount>???powershell $command = "set-executionpolicy Unrestricted"
'???powershell' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
它看起来像是使用某种不同的代码页或某些内容,因为这些特殊的字符不在我的cmd文件中.cmd文件是在Windows 8上通过VS 2012 Ultimate创建的.
你有一个想法,我怎么能在命令开头解雇那些特殊的字符?如果我通过远程桌面将命令从cmd文件复制到控制台,它可以正常工作!