I have an old server that has had a backup hardware failure. The server is going to be replaced. Instead of getting a new tape drive and tapes, portable hard drives were purchased to use for backing up. The server has USB 1 on it and the backups were terribly slow. I connected the drive to a workstation and this improved the speed but not enough. I am sending the backup to a workstation and I have a backup routine to move the files from the workstation to the portable hard drive. All of this works fine but I am trying to rename the backup folder to a name with the date and time using a batch file to accomplish all of this. The only snag in this is the rename. I tested the batch file in my office and it works fine but at my customers I get a syntax error. This is the command:
ren e:\Backup-to-disk %date:~-10,2%"-"%date:~-7,2%"-"%date:~-4,4%_%time:~0,2%%time:~3,2%%time:~6,2%
What is going wrong?