Windows 10: command line to copy files from dir A to B but skip existing ones
command line to copy files from dir A to B but skip existing ones
Is there a Windows command that can copy files from say directory A to directory B but skip any with the same name I don't want to update even if say directory A has a newer version than directory B --simply use existing names --if it exists skip.
I'm trying to replicate the Linux command :
rsync -a -v --ignore-existing <src> <dst> where src is source directory and dst is destination / target directory (or device etc)
(This command also has options to OVERWITE target directory with newer file -- I don't want that option yet - the example I gave will ignore existing files if they already exist in the target directory. Note also - this doesn't CARE what's in the files - it's purely on the NAME - no dates / attributes /size etc considerations are checked - simply the NAME - which is why this job can be lightning fast even for quite a lot of files.
What I'm trying to do is automate sending files to a NAS server every so often (say once a day / week) from WINDOWS clients when new files have been created --I don't need to backup all the windows clients - users can do that themselves - There's a job on the Clients that can backup / restore their desktop in entirety which is run on demand.
Any ideas --shouldn't be too hard but I don't really know too much of Windows possibilities from the CLI.
Note I don't want a GUI --need a command as this will be (eventually) an automated background process on the Windows clients.
I did see there's an experimental Bash interface - but putting that in the hands of inexperienced users would probably be a recipe for DISASTER !!!.
SyncToy is the app that comes to mind - If it's still available. Not command line but simple GUI
What I've done in the past is create backup/update/copy routines until they are reliable and fine tuned to meet all eventualities then create a shortcut for each, (option is included in software), and this is all the user gets access to
Download SyncToy 2.1 from Official Microsoft Download Center
There is the robocopy command which may be of use if you have to use command line Try robocopy /?
Thanks for the suggestion -- looks good and probably best on offer - however I'm really trying to get a 100% background batch job to run --want it to be as automatic and as "user-proof" as possible.
Thanks again for suggestion anyway as that program is good for other things too.
I've had problems with Robocopy in the past --- could also be my fault (always RTFM !!!!!) but I might also give it another go.
rsync is really good though if you use it properly --btw you must add a / to the end of the first directory in the source command or it will copy the WHOLE directory into the target -- e.g A will become A.A !!!! where A is within A.
Did you see my edit on Robocopy? It's not something I use but others swear by it. you could also use the shortcut data from Synctoy to use it inside a batch
The Robocopy scheme works -thanks --but :
Robocopy doesn't seem have an option to ignore date / timestamp on output directory -- it says ignore if source older than dest OR ignore if source newer than dest. Not sure if you can combine these !!
I'm trying to make 2 scenarios -- copy so long as file doesn't exist on target (any date), or copy regardless --i.e overwrite target if it exists.
The users want to have a choice -- sometimes when copying files they are working on something and don't want the original to be overwritten. I know you can encourage them to create a new file until they've finished with their changes --but have you ever tried "Educating Users" !!!!!!!
Pity Files don't have a thing like the IBM mainframes did where you had "generation" names automatically generated such as file_name(0), file_name(-1), file_name(+1) etc. !!
You may be able to create two, (or several), different variations to overwrite or not, and create, and present, Short-cuts to the user, or probably, better for you, create a command line instruction from the shortcut to add to the batch files
Need to open windows update, but it's not where it used to be and I can't use the start button.......
How can I open it?
I am trying to add a user via the command line through a virtual pc I added with VMWare. I'm running windows 10, and unable to add because this is what I get when I open CMD: I can't go beyond this point, I keep getting error messages. Any help...
After a lot of searching i have only found two possible tools that might do this. The one that seems rated best is called CopyQ. While it did install and appears to be available, I cannot seem to state to function correctly to get it to copy an...
I have several network connections configured.
There is one wifi connection which automatically connects to my WLAN,
another cable based LAN connection to a NAS which is used for backups
and some L2TP connection connections (used...
For some unknown reason I cannot any more navigate to Update panel from "Einstellungen" - it is blocked.
I have to cancel the "Einstellungen" window by the task manager !
So in this moment I cant go forward nor backward any more: cant...