Python shutil.move can';不在磁盘驱动器之间移动文件?

Python shutil.move can';不在磁盘驱动器之间移动文件?,python,shutil,Python,Shutil,我正在使用shutil.move将文件从我的下载(C:)移动到服务器上的文件夹(Z:) 但是,由于某些原因,每次运行脚本时,它都会返回以下错误: OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\\Users\\e1206433\\Downloads\\EstadisticaEjecGlo095914.csv' -> 'Z:\\AN\\Produban\\Operati

我正在使用shutil.move将文件从我的下载(C:)移动到服务器上的文件夹(Z:)

但是,由于某些原因,每次运行脚本时,它都会返回以下错误:

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'
我的理解是,在使用os.rename时会出现此错误,而shutil.move就是解决方案。但是我的脚本已经在使用shutil了


谢谢:)

如果您尝试使用
copy2
而不是
move
,是否会出现相同的错误?您是否尝试过使用
os.system()
supprocess.run()
来代替?哪个python版本?@ddor254 python 3.7是Im版本using@Aran-Fey copy2似乎出现了一个新错误,即使目录存在:FileNotFoundError:[Errno 2]没有这样的文件或目录:“Z:\\AN\\Produban\\Operations\\Print Management\\Misc\\Luca\\TEST 1”
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'