• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2150
  • Last Modified:

Robocopy or DOS Backup Folder Name Variable?

I'm using Robocopy to backup a server with a daily changing folder name:

robocopy "\\Server1\Backups\Server1Images.20070804" "J:\Server1\Server1Images.20070804" /r:1 /w:2 /mir

The folder name changes everyday: Server1Images.20070804, Server1Images.20070805, Server1Images.20070806
  • 2
1 Solution
Farhan KaziSystems EngineerCommented:
Try this using batch file.

@Echo Off
SET M=%DATE:~4,2%
SET D=%DATE:~7,2%
SET Y=%DATE:~10,4%
SET FName=%Y%%M%%D%
robocopy "\\Server1\Backups\Server1Images.%FName%" "J:\Server1\Server1Images.%FName%" /r:1 /w:2 /mir
kvnsdrAuthor Commented:
Is there a better way than timestamping the file to make my backups easier?
Farhan KaziSystems EngineerCommented:
I think time stamping is the standard/convenient way for making backups (using batch files).  However you can use Windows NTBackup.

For more info regarding NTBackup:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now