ROBOCOPY - Create Backup Script

Page 7 of 32 FirstFirst ... 5678917 ... LastLast

  1. Posts : 121
    Windows 7 Ultimate 64-bit
       #60

    Script Help


    Hi, I'm new to using robocopy and want some assistance.

    First of all, I've managed to create a script based on the first example that will copy files from two different sources to two different destinations using an example from the OP. This is what I am currently using.

    Code:
    robocopy "C:\Users\Josh\Documents\Backup Files" "F:\Backup Files" /e /mir /np /log:backup_log.txt
    robocopy "C:\Users\Public\Recorded TV" "F:\Recorded TV" /e /mir /np /log+:backup_log.txt
    pause
    A couple things:

    • With the first folder, Backup Files, I will be continuously adding files to the source. Occasionally, I want to update the destination, Backup Files on my external drive, leaving both source and destination files intact. Files will never be saved in the destination folder, only the source folder, then copied over when a backup is performed.
    • With the second folder, Recorded TV, I am wanting to MOVE files from one destination to the other, IF the file contains the names "Program 1", "Program 2", "Program 3" (as an example). Otherwise, I only want to copy (NOT move) the rest of the contents over, leaving it in both source and destination.

    If I can get some help on this, thanks in advance.
      My Computer


  2. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #61

    Hi,

    The first line of the script will work fine for your first case - keeping "Backup Files" synchronised between F: and C:.

    The second request is more complex as it's conditional to the existence of a name of a recorded program - how will the script know the name of the program?

    Regards,
    Golden
      My Computer


  3. Posts : 9
    Win 7 64 bit
       #62

    Golden, please, a little help, you seem to be the man. Strange issue using robocopy, it acts like its copying everything, but when i look in the folder, its empy. Yet other command lines work fine.

    Example:this line wont work:

    robocopy "C:\users\andysdad\My Documents" "e:\backup\My Documents" /S /A

    But this line will:

    robocopy "c:\users\andysdad\downloads" "e:\backup\downloads" /S /A

    ???
      My Computer


  4. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #63

    Hi,

    I'll have a look at this when I get home this evening, and post back here.

    Regards,
    Golden
      My Computer


  5. Posts : 9
    Win 7 64 bit
       #64

    No hurry, thanks
      My Computer


  6. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #65

    OK. Can you try this again:

    robocopy "C:\users\andysdad\My Documents" "e:\backup\My Documents" /S /A
    and then copy & paste the contents from the output screen here?

    Regards,
    Golden
      My Computer


  7. Posts : 9
    Win 7 64 bit
       #66

    I will


    As soon as i get home later today, thanks much
      My Computer


  8. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #67

    No worries - I'll keep visiting back here to check it out.
      My Computer


  9. Posts : 9
    Win 7 64 bit
       #68

    Test


    Lunch time test gives the error "error 5 (0x00000005) accessing source directory c:\users\andysdad\My Documents\

    Access is denied.
      My Computer


  10. Posts : 9
    Win 7 64 bit
       #69

    Sorry , forgot to run as Admin.
    Again usb drive started flashing like it was copying something, but nothing in backup directory, output

    dirs: total468 copied25 skipped443
    files 7956 copied 6 skip[ped 9750
    bytes total 16.101g copied 234.29
      My Computer


 
Page 7 of 32 FirstFirst ... 5678917 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:52.
Find Us