I am using shutil.move to move files from my downloads (C:) to a folder on a server (Z:).
source_dir = "C:\\Users\\e1206433\\Downloads\\estadisticaEjecGlo*.csv"
dest_dir1 = "Z:\\AN\Produban\Operations\Print Management\Misc\Luca\TEST 1"
for file in glob.glob(source_dir):
print(file)
shutil.move(file, dest_dir1)
But, for some reason everytime the script is run it returns this error:
OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\\Users\\e1206433\\Downloads\\EstadisticaEjecGlo095914.csv' -> 'Z:\\AN\\Produban\\Operations\\Print Management\\Misc\\Luca\\TEST 1'
My understanding is that this error is presented when using os.rename, and that shutil.move is the solution. But my script is already using shutil!
Thanks :)