jbcbussoft
asked on
Automated rename not working
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%_%t ime:~0,2%% time:~3,2% %time:~6,2 %
What is going wrong?
ren e:\Backup-to-disk %date:~-10,2%"-"%date:~-7,
What is going wrong?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That isn't what I did. I split the points 3 ways even though I solved my own problem.
ASKER
Thanks for the input!
ASKER
Olemo, "However, I cannot see why you should get a syntax error." Agreed! I tried this on my pc first with no problems. I wanted some fresh eyes on this since I was seeing no problem.