Ich habe versucht, mein erstes Python-Programm zu machen, die alle Dateien aus einem Ordner kopiert und in einer anderen einfügen:IOError mit shutil.copyfile() unter Windows
import shutil
shutil.copyfile("C:\Users\USER\Desktop\MoveFrom\Test.txt",
"C:\Users\USER\Desktop\MoveTo")
Aber ich immer eine Fehlermeldung bekommen und nicht herausfinden können, warum:
Traceback (most recent call last):
File "C:\Users\USER\Desktop\Python\movefiles.py", line 2, in <module>
shutil.copyfile("C:\Users\USER\Desktop\MoveFrom\Test.txt", "C:\Users\USER\Desktop\MoveTo")
File "C:\PYTHON27\lib\shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:\\Users\\USER\\Desktop\\MoveTo'
Dank @martineau - Touchscreens saugen manchmal. –