Re: Wrestling with robocopy
Shouldn't it be E:\folder2
Re: Wrestling with robocopy
Yes. :eek: 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.
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
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.
Re: Wrestling with robocopy
Quote:
Originally Posted by
sammyc
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.
Re: Wrestling with robocopy
Quote:
Originally Posted by
sammyc
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/
Re: Wrestling with robocopy
Quote:
Originally Posted by
matts-uk
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
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.
Re: Wrestling with robocopy
Be careful Robocopy might send Robocoppa in your direction.
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.