Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Dave Angel
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.s

Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Kent Johnson
On Mon, May 11, 2009 at 4:22 PM, 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) > ...         fo

Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Alan Gauld
"Matt Herzog" wrote I sure wish I could for the last line go, shutil.move("src", "dest") That would be cool. So why don't you? What is the problem? -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maill

[Tutor] moving files from one dir to another

2009-05-11 Thread Matt Herzog
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