We have a python script that ftp's (downloads) files.  However, target folder contents are deleted when the source is empty.
How do you not delete the files in the target dir when the source is empty?
We are using shutil.copy2 -- can that be the cause?  Are there alternatives that preserve metadata?
Turns out a boolean was being evaluated against a string.  This caused a True; it when into the if block and was purging the target dir.
Python: shutil.copy2 empties target dir