Re: [Tutor] Renaming Files in Directory

2014-10-09 Thread Alan Gauld
On 09/10/14 00:58, Felisha Lawrence wrote: Hello, I have the following program import os path = '/Users/felishalawrence/testswps/vol1' for file in os.listdir(path): newFile = path+file[:file.rindex("v")]+"v20" print newFile and I want to output the results of the 'newFile

Re: [Tutor] Renaming Files in Directory

2014-10-09 Thread Peter Otten
Felisha Lawrence wrote: > I have the following program > import os > > path = '/Users/felishalawrence/testswps/vol1' > for file in os.listdir(path): > newFile = path+file[:file.rindex("v")]+"v20" > > print newFile > and I want to output the results of the 'newFile' variable in

[Tutor] Renaming Files in Directory

2014-10-09 Thread Felisha Lawrence
Hello, I have the following program import os path = '/Users/felishalawrence/testswps/vol1' for file in os.listdir(path): newFile = path+file[:file.rindex("v")]+"v20" print newFile and I want to output the results of the 'newFile' variable into the directory specified by the '