newbie: windows xp scripting
oscartheduck
oscartheduck at gmail.com
Sun May 21 16:22:22 EDT 2006
For completeness' sake, this is the new script I came up with:
import os
dirfrom = 'C:\\test'
dirto = 'C:\\test1\\'
makedir = 'mkdir "%s"' % dirto
copy_command = 'copy "%s" "%s"' % (dirfrom, dirto)
if os.system(copy_command) == 0:
print "yay"
else:
if os.system(makedir) == 0:
if os.system(copy_command) == 0:
print 'yay!'
else:
print 'WTF mate?'
Is there a more efficient way of doing this?
More information about the Python-list
mailing list