Newbie: easiest way of renaming a file

Fredrik Henbjork frehe491 at student.liu.se
Tue Mar 14 20:21:34 CET 2000


Lars Hoeyrup Jensen wrote:
> 
> I want to rename a lot of files with a Python-program. Is it necessary
> to read the whole file, write it to a new file and then delete the
> original file?

Take a look at os.rename().

-- 
Fredrik Henbjork

http://o112.ryd.student.liu.se




More information about the Python-list mailing list