0

这是我的代码。所有文件都正是我指向的位置,除了在运行 .bat 文件之后,它说没有找到 SPSupport.BHF,当我进入目录时,SPSupport.BHF 不存在。关于有什么问题的任何想法?基本上,如果是windows 7,它会在某个位置下载windows 7文件,否则它会下载windows xp文件。我使用的是 windows xp 计算机,当我运行 .bat 文件时,它会在 cmd 中正确打印出所有这些命令,除了在我尝试运行它的最后一步时,它说找不到内部或外部命令以及何时我进入目录,文件甚至没有成功复制。

注意:它还在乞求时说“不支持UNC路径。默认为Windows目录”。这可能是为什么?这意味着什么?

@echo off


mkdir C:\Windows\Temp

if exist "C:\Users\" goto win7

if exist "C:\Documents and Settings\" goto winxp

:win7
xcopy /s /Y \\torwan\Shared\SPSupport.BHF C:\Windows\Temp
xcopy /s /Y \\torwan\Shared\PCA.megamation.CIF C:\Windows\Temp
START C:\Windows\Temp\SPSupport.BHF
goto exit

:winxp
mkdir "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere"
echo d xcopy /s /Y \\torwan\Shared\xp\SPSupport.BHF "C:\Documents and Settings\All   Users

\Application Data\Symantec\pcAnywhere"
echo d xcopy /s /Y \\torwan\Shared\xp\PCA.megamation.CIF "C:\Documents and Settings\All     Users

\Application Data\Symantec\pcAnywhere"
"C:\Documents and Settings\All Users\Application  Data\Symantec\pcAnywhere\SPSupport.BHF"
PAUSE
goto exit

:exit
4

1 回答 1

1

您可以从本地计算机运行 bat 文件而不是从网络驱动器运行它吗?您在“C:\Documents and Settings\All Users\Application Data\ 中的应用程序和数据之间有一个额外的空间

于 2013-07-15T17:50:43.663 回答