drezha
1
Trying to create a batch file to backup my save games but I cant get the variable to work…
I have
set var = E:\Game Saves
# Backup Game Save Folder
robocopy "C:\Users\Chris\Saved Games" "%var%\Users\Chris\Saved Games" /E /Z
when running the script from root of E, it just creates Users in E Where am I going wrong?
quotes around the var setting ?
Eg: set var = “E:\Game Saves”
Damski
3
I concur, needs the quotes
…and quite possibly needs to be
set var = "E:\\Game Saves"
# Backup Game Save Folder
robocopy "C:\\Users\\Chris\\Saved Games" "%var%\\Users\\Chris\\Saved Games" /E /Z
DT.
drezha
5
Neither work I’m afraid maybe robocopy cant take variables…
never come across robocopy before… had a look at “xcopy /?” ?
drezha
7
robocopy is standard in Vista and Windows 7 and can be downloaded in XP from Windows. It’s better at directory copying apparently.
Getting the var isn’t really an issues, just means I cant change the save location as easily. Never mind.