This is a Python program that recursively compares filenames in a source directory against a reference directory. If any files are missing in the reference directory, it copies those files from the source directory to a third directory while retaining the folder structure of the source. It was written by ChatGPT.
It works better than rsync in this case because rsync won't allow you to use a reference directory and only take into account filenames instead of timestamps and sizes.
faada4ecc3 | ||
---|---|---|
LICENSE | ||
README.md | ||
compare_and_copy.ps |
README.md
copy_and_compare
This is a Python program that recursively compares filenames in a source directory against a reference directory. If any files are missing in the reference directory, it copies those files from the source directory to a third directory while retaining the folder structure of the source. It was written by ChatGPT.
It works better than rsync in this case because rsync won't allow you to use a reference directory and only take into account filenames instead of timestamps and sizes.