alisafia
asked on
batch
I have scripts that run on Win2K/WinXP/win23k/winvist a machines 32bit OS i.e "if exist "c:\programs files\ntp\ntp.exe" do xcopy "\\filesrv2\time server\ntp.conf" "c:\program files\etc\" It runs great with no problem.
I have recently introduced Windows Vista 64bit. The default install location for the ntp program is now
c:\program files(x86)\ntp\ntp.exe
I want a syntax that will work for 32 bit and 64bit OS.
i.e. script checks both locations and then run it
c:\program files(x86)\ntp\ntp.exe
c:\programs files\ntp\ntp.exe
I have recently introduced Windows Vista 64bit. The default install location for the ntp program is now
c:\program files(x86)\ntp\ntp.exe
I want a syntax that will work for 32 bit and 64bit OS.
i.e. script checks both locations and then run it
c:\program files(x86)\ntp\ntp.exe
c:\programs files\ntp\ntp.exe
I know the ~ character works in XP so maybe try copying to c:\progra~1\ntp\ntp.exe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I forgot to tell you that save the above batch script as .Bat file and run it.
Keyword "DO" is not recognized as any command in DOS. I think you have used it to just explain what you want to do.
Keyword "DO" is not recognized as any command in DOS. I think you have used it to just explain what you want to do.
Open in new window