Reputation: 789
Here is my code. All the files are exactly where im pointing to, except in the end after running the .bat file, it says that SPSupport.BHF is not found and when I go into the directory, SPSupport.BHF is not there. any ideas on what's wrong? Basically, if it's windows 7, it downloads the windows 7 file in a certain location, other wise it downloads the windows xp file. I'm using a windows xp computer and when I run the .bat file, in the cmd it prints out all of these commands correctly except on the last step when I try to run it, it says internal or external command not found and when I go into the directory, the files aren't even copied successfully.
Note: It also says "UNC paths are not Supported. Defaulting to Windows Directory" at the begging. could that be why? What does that mean?
@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
Upvotes: 0
Views: 1995
Reputation: 4750
Can you run the bat file from the local machine instead of running it from a network drive? You have an extra space between Application and Data in "C:\Documents and Settings\All Users\Application Data\
Upvotes: 1