Seite 1 von 1

Datei kopieren

Verfasst: Montag 16. Juli 2007, 12:17
von The Spirit
Hi.
Gibt es einen befehl mit dem ich komplette Dateien (Excel, Word, ...) von einem Verzeichnis in ein anderes Verzeichnis kopieren kann?
Thx

Verfasst: Montag 16. Juli 2007, 12:25
von EnTeQuAk
Hallo The Spirit.

Dafür gibt es das Modul 'shutil'.

Siehe http://www.python-forum.de/topic-9643.html
und http://www.python.org/doc/2.4.4/lib/module-shutil.html

MfG EnTeQuAk

Verfasst: Montag 16. Juli 2007, 12:26
von Zap

Code: Alles auswählen

import shutil
shutil.copyfile("alt.txt","neu.txt") 
Edit: zu spät ;)

Verfasst: Montag 16. Juli 2007, 12:45
von The Spirit
thx