Sunday, September 22, 2019

python - Copy file if it doesn't already exist

I'm fairly new to python, and I'm wondering how I can copy and paste a file from one location to another with first checking to see if the copied file exists in the destination folder?



The reason I want to check if the file exists is this script will be put on a task scheduler and run on a set schedule, so I don't want to be copying everything every single time, just those files that don't exist in the destination folder?



Thanks in advance!

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...