Link to home
Start Free TrialLog in
Avatar of jbcbussoft
jbcbussoftFlag for United States of America

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%_%time:~0,2%%time:~3,2%%time:~6,2%

What is going wrong?
SOLUTION
Avatar of M A
M A
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jbcbussoft

ASKER

MAS, I will have access to the computer after 4:30 CDT. I will report the results then.

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.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That isn't what I did. I split the points 3 ways even though I solved my own problem.
Thanks for the input!