Results 1 to 10 of 10

Thread: Wrestling with robocopy

  1. #1
    Ghost of Hexus Present sammyc's Avatar
    Join Date
    Nov 2007
    Posts
    3,320
    Thanks
    782
    Thanked
    494 times in 394 posts

    Wrestling with robocopy

    I used this for the first time, to copy a largeish folder to an external drive, where I wanted to keep the timestamps etc - all fine & good.

    What I can't get it to do, is add in only a new folder (that I created just to test). All I will want to do is update it occasionally with some new stuff, nothing complicated of a backup/sync nature, just rerun & add what's new.

    I tried among other things,

    "C:\Users\user\Desktop\folder" "E\folder2" /COPYALL /dcopy:T /maxage:1

    and first off thought that didn't work because I'd created an empty folder, but adding in /E didn't help. I just get Total 1 Copied 0 Skipped 1.

    All the stuff I've read suggests that /maxage should work - other variations without it just result in it setting off to copy the lot again.

    Any suggestions why it might be skipping this folder (which is no different to all the folders it copied in the first run)? Ta.
    Aliorum vitia turbaverunt me

  2. #2
    Super Moderator Jonj1611's Avatar
    Join Date
    Jun 2008
    Posts
    5,718
    Thanks
    1,754
    Thanked
    994 times in 761 posts

    Re: Wrestling with robocopy

    Shouldn't it be E:\folder2
    Jon

  3. Received thanks from:

    sammyc (16-04-2021)

  4. #3
    Ghost of Hexus Present sammyc's Avatar
    Join Date
    Nov 2007
    Posts
    3,320
    Thanks
    782
    Thanked
    494 times in 394 posts

    Re: Wrestling with robocopy

    Yes. Not sure if I did it wrong, or just did it wrong posting here.. (goes to check)

    edit: either way, doesn't work. Says Dirs Total 1 Copied 0 Skipped 1.
    Last edited by sammyc; 16-04-2021 at 05:29 PM.
    Aliorum vitia turbaverunt me

  5. Received thanks from:

    Jonj1611 (16-04-2021)

  6. #4
    Senior Member AGTDenton's Avatar
    Join Date
    Jun 2009
    Location
    Bracknell
    Posts
    2,698
    Thanks
    984
    Thanked
    828 times in 542 posts
    • AGTDenton's system
      • Motherboard:
      • MSI MEG X570S ACE MAX
      • CPU:
      • AMD 5950x
      • Memory:
      • 32GB Corsair something or the other
      • Storage:
      • 1x 512GB nvme, 1x 2TB nvme, 2x 8TB HDD
      • Graphics card(s):
      • ASUS 3080 Ti TuF
      • PSU:
      • Corsair RM850x
      • Case:
      • Fractal Design Torrent White
      • Operating System:
      • 11 Pro x64
      • Internet:
      • Fibre

    Re: Wrestling with robocopy

    Have you considered using SyncToy/FreeFileSync?
    It might be a lot easier. I still use SyncToy as it saves the headache, can also be run from command prompt

  7. Received thanks from:

    sammyc (16-04-2021)

  8. #5
    Ghost of Hexus Present sammyc's Avatar
    Join Date
    Nov 2007
    Posts
    3,320
    Thanks
    782
    Thanked
    494 times in 394 posts

    Re: Wrestling with robocopy

    Thanks, yes, I may well move onto another option, because robocopy doesn't do all I want in other ways - for example, I'd prefer to copy selected subfolders but it seems you can't as it just copies the contents - I agree with this question (ie you'd expect it to be able to - https://superuser.com/questions/3796...its-time-stamp).

    For now it's partly the usual thing of "would like to understand how it works", for my own satisfaction.
    Aliorum vitia turbaverunt me

  9. #6
    Senior Member
    Join Date
    Jul 2012
    Location
    By the sea
    Posts
    319
    Thanks
    27
    Thanked
    114 times in 72 posts
    • matts-uk's system
      • Motherboard:
      • Apple iMac
      • CPU:
      • Core i7 3.4Ghz
      • Memory:
      • 12GB DDR3
      • Storage:
      • RAID5 on the twin Xeon server I keep in the airing cupboard
      • Graphics card(s):
      • ATI 7970M
      • Case:
      • A lurvely slimline, all in one aluminium number.
      • Operating System:
      • OSX, Centos, Windows.
      • Monitor(s):
      • 27" LED (Apple), 24" LED (Apple), 2 x 20" TFT Dell
      • Internet:
      • ADSL rubbish

    Re: Wrestling with robocopy

    Quote Originally Posted by sammyc View Post
    Thanks, yes, I may well move onto another option, because robocopy doesn't do all I want in other ways - for example, I'd prefer to copy selected subfolders but it seems you can't as it just copies the contents - I agree with this question (ie you'd expect it to be able to - https://superuser.com/questions/3796...its-time-stamp).

    For now it's partly the usual thing of "would like to understand how it works", for my own satisfaction.
    You may be able to meet your original requirement using the /mon parameter of robocopy.

    Robocopy started life as a quick and dirty hack for Windows 95, providing a workaround for some of the shortcomings of xcopy. Take a look at xcopy as it has been vastly improved over the years.

    When neither robocopy nor xcopy can meet the requirement out of the box, you can impose your own logic with some scripting. IIRC xcopy being less of a hack is slightly more script friendly.

  10. Received thanks from:

    sammyc (17-04-2021)

  11. #7
    Senior Member
    Join Date
    Oct 2012
    Posts
    415
    Thanks
    158
    Thanked
    95 times in 66 posts

    Re: Wrestling with robocopy

    Quote Originally Posted by sammyc View Post
    I tried among other things,

    "C:\Users\user\Desktop\folder" "E\folder2" /COPYALL /dcopy:T /maxage:1
    Is it possible that some of the commands need to be case sensitive? Like I think DCOPY and MAXAGE should be in Upper Case. I know it matters in some OS's like Unix...

    Also not sure you're meant to put quotations in the source and destinations...

    I found this resource as well, maybe it'll help you. Seems like a comprehensive guide: https://adamtheautomator.com/robocopy-the-ultimate/
    "Arrogance and stupidity all in the same package. How efficient of you!" - Ambassador Londo Mollari
    "Never interrupt your enemy when he is making a mistake." - A General

  12. Received thanks from:

    sammyc (17-04-2021)

  13. #8
    Ghost of Hexus Present sammyc's Avatar
    Join Date
    Nov 2007
    Posts
    3,320
    Thanks
    782
    Thanked
    494 times in 394 posts

    Re: Wrestling with robocopy

    Quote Originally Posted by matts-uk View Post
    You may be able to meet your original requirement using the /mon parameter of robocopy.

    Robocopy started life as a quick and dirty hack for Windows 95, providing a workaround for some of the shortcomings of xcopy. Take a look at xcopy as it has been vastly improved over the years.

    When neither robocopy nor xcopy can meet the requirement out of the box, you can impose your own logic with some scripting. IIRC xcopy being less of a hack is slightly more script friendly.
    I looked at xcopy before I started and something put me off it (not sure what now) & steered me towards robocopy.. that may have been hasty.. I'll have another look sometime. I think /mon may be a bit too broad in this instance, when I just want (after the initial main copy) to make changes to the copy as it suits me, not necessarily do something that affects everything. I'm not looking to sync all contents which is why I steered away from /mir as well. I'd like to know what's causing the skip error with this so will fiddle around some more before I give up on robocopy - if it can do what I want without error, even if not perfect in all ways, I'm reluctant to waste having got to grips with it.

    Quote Originally Posted by Scryder View Post
    Is it possible that some of the commands need to be case sensitive? Like I think DCOPY and MAXAGE should be in Upper Case. I know it matters in some OS's like Unix...

    Also not sure you're meant to put quotations in the source and destinations...

    I found this resource as well, maybe it'll help you. Seems like a comprehensive guide: https://adamtheautomator.com/robocopy-the-ultimate/
    Case seems ok*, as that's how I did the main copy, (dcopy anyway, maxage not applicable at that point) & had no problem. The quotations are there because these are sample file names just for posting here, my actual folders have longer names with spaces and I read (for one instance) https://social.technet.microsoft.com...m=winservergen) that in that case quotations were necessary.

    I have that ultimate guide link open in a tab here and have been referring to it among many others (ultimate isn't an exaggeration, it may be that it has the answer & I just haven't ferreted it out yet!).

    * have tested anyway now, & it makes no odds.
    Last edited by sammyc; 17-04-2021 at 12:54 PM.
    Aliorum vitia turbaverunt me

  14. #9
    Moosing about! CAT-THE-FIFTH's Avatar
    Join Date
    Aug 2006
    Location
    Not here
    Posts
    32,039
    Thanks
    3,910
    Thanked
    5,224 times in 4,015 posts
    • CAT-THE-FIFTH's system
      • Motherboard:
      • Less E-PEEN
      • CPU:
      • Massive E-PEEN
      • Memory:
      • RGB E-PEEN
      • Storage:
      • Not in any order
      • Graphics card(s):
      • EVEN BIGGER E-PEEN
      • PSU:
      • OVERSIZED
      • Case:
      • UNDERSIZED
      • Operating System:
      • DOS 6.22
      • Monitor(s):
      • NOT USUALLY ON....WHEN I POST
      • Internet:
      • FUNCTIONAL

    Re: Wrestling with robocopy

    Be careful Robocopy might send Robocoppa in your direction.

  15. #10
    Ghost of Hexus Present sammyc's Avatar
    Join Date
    Nov 2007
    Posts
    3,320
    Thanks
    782
    Thanked
    494 times in 394 posts

    Re: Wrestling with robocopy

    brb, plot thickens.

    I tested this again by adding a couple more new folders to the original, and found that the 'skipped 1 directory' report remained the same (same details, number of files, size etc) - & rerunning with no new folders, ie asking it to rerun the original copy with the maxage command, the same.

    So I belatedly added in /v and it turns out the skipped directory is the source directory, or rather it but just singling out 29 of its individual files, all either .htm or .jpg & as 'too old'. (More homework needed obviously.)

    That solves that, but not the reason why it is not updating with the new, added folder & /maxage - also, more homework.
    Last edited by sammyc; 18-04-2021 at 02:24 PM.
    Aliorum vitia turbaverunt me

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •