[Tutor] moving files from one dir to another
msh at blisses.org
Mon May 11 22:22:36 CEST 2009
Should be simple, right? Not for me, heh.
... 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,
That would be cool.
I fear you speak upon the rack,
Where men enforced do speak anything.
- William Shakespeare
More information about the Tutor