Robocopy or DOS Backup Folder Name Variable?

Posted on 2007-08-04
Last Modified: 2013-11-05
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
Question by:kvnsdr
    LVL 26

    Expert Comment

    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
    LVL 1

    Author Comment

    Is there a better way than timestamping the file to make my backups easier?
    LVL 26

    Accepted Solution

    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:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
    How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
    This tutorial will give a short introduction and overview of Backup Exec 2014 and the additional features that have been added over its predecessor Backup Exec 2012. As with Backup Exec 2012, the Backup Exec button in the upper left corner. From her…
    This tutorial will walk an individual through the process of upgrading their existing Backup Exec 2012 to 2014. Either install the CD\DVD into the drive and let it auto-start, or browse to the drive and double-click the Browser file: Select the ap…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now