Matt Herzog wrote:
Should be simple, right? Not for me, heh.
def schmove(src,dst):
... src = '/home/datasvcs/PIG/cjomeda_exp/'
... dst = '/home/datasvcs/PIG/cjomeda_exp_archive/'
... listOfFiles = os.listdir(src)
... for filez in listOfFiles:
... os.system("mv"+ " " + src + " " + dst)
The above code does not copy anything. I sure wish it would spit just one error.
I sure wish I could for the last line go,
shutil.move("src", "dest")
That would be cool.
Plz halp!
Just use os.rename() if the dest is a directory, it'll move the file
there.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor