Anyone familair with robocopy?

Page 1 of 3 123 LastLast

  1. Posts : 740
    Windows 10 x64 Pro
       #1

    Anyone familair with robocopy?


    let me explain what im trying to do.

    I have a ton of data sequestered on different hard drives (apart from my system drive) and this obviously helps me have data backed up and helps me when/if i need to format by saving a tremendous amount of time.

    Unfortunately due to costs theyre all mechanical HDD's which can fail at a moments notice and put years of work a tons of data at risk. (plus theyre getting full).

    Ive managed to ship some stuff to the cloud, and otherstuff ive backed up in multiple places. The last thing I have left to take care of before I start upgrading drives is to copy all my hierarchy/directory trees.

    If i ever had dataloss having these available would make "returning to form" (for lack of a better phrase) much easier. (i have a bad memory).

    Anyways, without any more carrying on - Ive used xcopy in the past with success. Now ive tried using robocopy but Im hititng a snag.

    I plan to create a "folder structure" folder and inside it have individual folders with all my drive letters. D, T, U, etc.

    Inside each of those folders will be the folder tree I have on said drives. Then I'll take the conglomeration of folders "folder structure folder" and put it in the cloud, on a usb stick, etc.

    The specific folder im having trouble with - which is the first one I tried and the reason im posting. I expect to have the same issue with others going forward so I figured id better ask for some help.

    I use robocopy "U:" "C:\Users\klepp\Desktop\U" /e /xf *

    This began copying over all my folders but it stopped at a folder called "System Volume Information" and went on about permissions and retrying in 30 seconds which obviously continued to fail.

    From what I gather this is a hidden folder present on every disk which means I'll run into this on each disk who's structure I try to copy.

    After all that long-windedness, my question is how can I omit that folder from being copied?

    Thank you!
      My Computer


  2. Posts : 12,799
    Windows 11 Pro
       #2

    Do you have 'show hidden folders' enabled? If so, see if not showing them helps.

    Copying a drive/to a drive can be done, but Robocopy is better at being a folder to folder copy. It should also avoid your problem. See if this helps, it is for Windows 7 but works the same on Windows 10. ROBOCOPY - Create Backup Script - Windows 7 Help Forums
      My Computer


  3. Posts : 1,680
    X
       #3

    Yes, that's a hidden system folder. And ordinarily it's permissions won't let you (or robocopy) inside.
    And anyway you don't want to back it up. Ever.
    It contains restore points, which are unusable as a backup.
      My Computer


  4. Posts : 12,799
    Windows 11 Pro
       #4

    I know what the folder is, but I am saying see if you can not have it showing when you try to copy your U drive

    I edited my post above, see if any of that helps.
      My Computer


  5. Posts : 740
    Windows 10 x64 Pro
    Thread Starter
       #5

    Hey guys, thanks for the replies. Ironically A) i never considered that (the fact its a hidden folder as I do have hidden folders enabled) but B) in explorer it still doesnt show up if I click on my U drive for example. I def dont have "show protected OS files" enabled.

    Regardless I'll disable that and see if it makes a difference. If it does, great. If not ill visit that link and look at the script.

    Thanks again very much!
      My Computer


  6. Posts : 8,057
    windows 10
       #6

    Have you tried the GUI of Robocopy it can make doing scripts simple Utility Spotlight: Robocopy GUI
      My Computer


  7. Posts : 740
    Windows 10 x64 Pro
    Thread Starter
       #7

    Well I did 2 things. 1) disabled show hidden folders 2) ran cmd as admin (may have done this before, not sure so not sure which I can attribute it "partially" working to.

    Basically i created a plain jane empty U folder on my desktop. Partially as a test with my least sensitive backup drive and partially so I can do them all individually, keep track, and then move all the "folders of folders" to a perma-backup area.

    This being said, the minute I hit "enter" on the cmd prompt, my U folder on the desktop disappeared. The copy did go through fine and it disappeared due to it still copying the System Volume Information folder. I was able to "see" it by enabling "protected OS files" so theres that.

    Now I'm going to look at the posted link, but irrespective of that - if i were to be forced into doing it the way I just did, no harm would come from simply disabling the System Volume Information folder in the empty/copied to directory right? I imagine this would make it "un" hidden. EDIT - deleting the SVI folder def does not un-hide it. Cant even select the hidden checkbox in properties, greyed out ;P

    Not the most elegant solution but its where I'm at atm
      My Computer


  8. Posts : 740
    Windows 10 x64 Pro
    Thread Starter
       #8

    Samuria said:
    Have you tried the GUI of Robocopy it can make doing scripts simple Utility Spotlight: Robocopy GUI
    Nope, im an anal/ocd SoB. I really try to keep installed programs to a minimum. Im going to take a look though cause if its portable it may be worth hanging onto ;p

    Though there is something to be said about using the command line. I try to learn things n all... lol.
      My Computer


  9. Posts : 31,459
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #9

    klepp0906 said:
    Though there is something to be said about using the command line. I try to learn things n all... lol.
    I use RoboCopy in a batch file to backup my user folder. There's a couple of pitfalls to be aware of. You've already found the 'retries' one. The default is a million retries waiting 30 seconds between each (that's nearly a year!). NTUser.dat was the file that it caught me out on. There's some switches to deal with that...
    ::Retry Options :
    /R:n :: number of Retries on failed copies: default 1 million.
    /W:n :: Wait time between retries: default is 30 seconds.
    ...I skip locked files with /R:0 (which would probably have fixed your 'System Volume Information' problem too).

    The other problem I had was an infinite recursion (well, until the maximum path length was exceeded) of particular folders on the destination drive. These were caused by what look like links to 'My Music', 'My Pictures', etc. in the Documents folder. They're not links, they are Junction Points, there's a switch to deal with that too.
    /XJD :: eXclude Junction points for Directories.
    Type RoboCopy /? for the full list.
      My Computers


  10. Posts : 740
    Windows 10 x64 Pro
    Thread Starter
       #10

    While tedious to set up, and unable to be used if I add a new main folder (without editing) as opposed to being able to do the entire drive (with a way to omit SVI) the batch file method seems to be the win.

    I did look into a GUI tool but it didnt really save me any trouble as it only allowed me to add a folder at a time and the one I viewed didnt have the exclude file option anyhow (had to be added manually)

    I also looked at robocopy gui but it required an install. meh. Batch it is. Lets me learn a bit more and tailor it to my needs. It seems the /e and /xf * copied all the folders but didnt keep them nested properly so i gotta figure that out :P

    I appreciate pointing me in the right direction though, very much so :)
      My Computer


 

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

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




Windows 10 Forums