

It will pre-check the folders in the inputselect box if either of those conditions exist. In one instance it runs through the entire database of thumbnail files and it determines if any of those thumbnail "dat2" files refer to folders which 1) no longer contain any files and 2) which folders no longer exists. New_dirs_create.append(os.path.Hi Don, I have a couple of scripts which must determine if the folder is empty of files, one being the Thumbnail Maintenance script. Print "Usage: ", sys.argv, "currentdir olddir difference"ĭestination_files.append(re.sub(dir1, dir3, item)) Os.path.abspath(os.path.join(dir2, item)), Os.path.abspath(os.path.join(dir1, item)), It usage is simple - give it the absolute path of new directory, old directory and difference directory in that order. I have posted the whole script and usage in my personal site. But in my case I had to write my own script using Python, as python has the "filecmp" module for file comparison. I am not sure whether you can do it with any existing linux commands such as rsync or diff. It doesn't necessarily have to be using rsync, but I'd like to know what I'm doing wrong if possible. I have been looking for a solution for the past couple of days and I'd really appreciate some help.


How do you compare old with current and copy the files which are different (or entirely new) in current to difference?
