please help me!!

Werner Schiendl n17999950.temp.werner at neverbox.com
Thu Oct 23 12:59:03 EDT 2003


Hi,

danissim wrote:

> i must to do somthing that rename the files into a folder
> for example in to a folder "work" i have the files "asd.jpg" "dsa.jpg" and
> "esd.jpg"
> now i must to rename the pictures to "workF.jpg""workR.jpg""workD.jpg"

to rename files, you'll want to use the function rename from module os.

e. g.

 >>> import os
 >>> os.rename("old.jpg", "new.jpg")

I cannot see any rule for your renaming from your example, though


hth
Werner





More information about the Python-list mailing list