Compare 2 folders6/1/2023 Also, this is for a custom nightly backup solution, where reliability and data integrity is a priority, so given that a few weeks ago I couldn't even figure out a for-loop in a batch script, I'm pretty sure I lack the experience to do this right, or even determine the best way to do this. I'm a UNIX dev myself, and wouldn't be asking if this were a UNIX system we're dealing with, but alas. Or, a full path on either the source or the target folder would be acceptable too: C:\source\foo\bar\b.txtĪs the example shows, I don't care about files and folders that have been deleted or created! Which should make this task much simpler than otherwise. Then given a magical script or command, say, magic C:\source C:\target, I'd like the output to be foo\bar\b.txt I'm looking for a way to compare two folders recursively and output the relative paths all files (and folders) that are different (by size or by timestamp, à la rsync).įor example, say I have C:\source\foo\a.txtĪnd suppose b.txt has been changed under C:\source, and is thus newer.
0 Comments
Leave a Reply. |