Robocopy Syntax

Posted on 2008-11-05
Last Modified: 2009-12-16
I want to use Robocopy to copy backup data (Shadow Protect) to an external USB drive so the client can take it home every night. I would like to run robocopy every night but would like to only copy the new incrementals (or changes to the backup folder) The backup software will only keep 4 weeks of backups and delete the older backups. What would be the best command for that. I have tried using:
robocopy "F:\Shadow Protect" "G:\Shadow Protct" /MIR /SEC /COPYALL /V /NP /B /R:10 /W:30

Is there a syntax I can use that will delete backup files from the (target) USB drive that are older than say 4 weeks?
Question by:co_ol
    1 Comment

    Accepted Solution

    I think I worked it out. Using the /B does also delete the files / folders on the destination target

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Integrate social media with email signatures

    Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now