[Python-de] Newbie frage
Michael Brehm
brehm at cenix-bioscience.com
Mit Feb 16 14:30:53 CET 2005
Hallo!
Ich sitze an einem Script das folgendes machen soll:
Empfangen eines Dateinamens ( inkl. Verzeichnis ) z.B.
C:\Test\Document.txt
Umbenennen der Datei in Document_mmhhss_ddmmyyyy.txt
Kopieren der Originaldatei zu einen Verzeichnis z.B. D:\Test2
Kopieren der Veraenderten Datei z.B. D:\Test3
Ich bin soweit, aber irgendwie will es nicht so recht laufen.
import sys
import shutil
import os
import time
for arg in sys.argv:
shutil.move (arg[1],arg[2])
File.txt = os.path.splitext(arg[2])
file = os.path.join( File + "_" + time.strftime('%H%M%S_%d%m%Y'), txt)
Michael Brehm
Senior Research Assistant
Cenix BioScience GmbH
Tatzberg 47
01307 Dresden
Germany
Tel : +493514173123
Fax : +493514173109
brehm at cenix-bioscience.com
http://www.cenix-bioscience.com
This message is intended for the addressee only as it contains private
and confidential information. The contents are not to be disclosed to
anyone other than the addressee. Unauthorised recipients are requested
to comply with the above and to inform the sender immediately of any
errors in transmission.
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://starship.python.net/pipermail/python-de/attachments/20050216/604f2c7f/attachment.htm