Regular backups of Asset Server

I need to set up regular backups of our Asset Server and have used the ‘as_backup’ command line tool described here (http://docs.unity3d.com/Documentation/Manual/SettinguptheAssetServer.html) to do this. However, when I run the tool for a second time, I just get an error stating the following:

“A subdirectory or file Q:\unity_backup\backup already exists.
Failed to create Q:\unity_backup\backup. Do you have administrative privileges?”

However, the command is definitely being run by an administrator. It seems that it isn’t able to overwrite/move the old backup, despite the following code that I believe should do that.

rem Make sure backup directory is created and empty
rem move any old backup dir to the side
for /f “tokens=1,2,3,4 delims=:,” %%A in (“%TIME%”) do set TIMESTAMP=%%A%%B%%C
if exist %BACKUP% move %BACKUP% %BACKUP%_%DATE%-%TIMESTAMP%

I am not a coder myself - can somebody point me in the right direction? Does the as_backup code just need altering? Or, is there another method?

For anybody who might be interested, finally got this to work. It seems like the issue was with the date format that the standard script was using. We replaced a couple of lines of the script and it now works a treat!

Replace this:

for /f “tokens=1,2,3,4 delims=:,” %%A in (“%TIME%”) do set TIMESTAMP=%%A%%B%%C
if exist %BACKUP% move %BACKUP% “%BACKUP%_%DATE%-%TIMESTAMP%”

with this:

set backupFilename=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
if exist %BACKUP% move %BACKUP% “%BACKUP%_%backupFilename%”

FYI - this just puts a date stamp on the moved folder, but that should be fine for most scenarios.