Jul-14-2020, 07:51 AM
Hi,
I want to run a script that uses the shutil module to copy the last added file. I can use the code below to copy a file, but how would I go about telling it to copy the last modified file only instead of naming the file. Every 20th file would also work. This is to make it easier when creating timelapses for construction with the intent to host the script on a server that runs once a day.
I want to run a script that uses the shutil module to copy the last added file. I can use the code below to copy a file, but how would I go about telling it to copy the last modified file only instead of naming the file. Every 20th file would also work. This is to make it easier when creating timelapses for construction with the intent to host the script on a server that runs once a day.
import shutil shutil.copy("file.txt", "backup") breakAny help would be appreciated.