I already read some useful infos here about moving files with Python. But those are not working on my machine. I use eclipse to run python and the program should move files within windows. I used os.rename, shutil.move, shutil.copy and so on....
Here is my simple code.
import os
import shutil
source = os.listdir("C:/test/")
dest_dkfrontend = "C:/test1/"
for files in source:
if files.startswith("Detail"):
print('Files found ' + files)
shutil.copy(files, dest_dkfrontend)
else:
print('File name not matching')
I receive an error like:
with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory:
Could you please help to address this?