can anyone please suggest a method (ruby, python or dos preferable) to remove only the different files and sub-folders between two given folders?
I need it to recurse through sub-directories and delete everything that is different.
I don’t wanna have to install anything, so a script would be great.
Thanks in advance
This is the kind of thing I have done when I wanted to diff directories:
Notice that there is a check for regular files. I seem to recall that I encountered files used as semaphores or which were written to by one process and read by another or something. It turned out to be important.
You can add code to delete files, according to whatever rules you like.