开发者

Unable to use a set variable in batch file

Hi I have this code in my batch file

set destpath = "C:\"

copy 开发者_如何学Gohelp.txt %destpath%

pause

But I see that the command that gets executed while running the batch file is

copy help.txt

The batch file is not recognizing the 'destpath' variable at all. What could be the issue here?


You should have no space before the equal sign. Try

set destpath=c:\

instead.


don't use spaces: set destpath="C:\"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜