change extensions

Peter Hansen peter at engcorp.com
Mon Apr 11 10:04:36 EDT 2005


Tim Roberts wrote:
> "Bob Then" <bob_then at yahoo.com.au> wrote:
>>how can i change all files from one extension to another within a direcory?
> 
> In Windows, the quickest way is:
> 
>     os.system( "rename *.old *.new" )

I have a vague memory that this won't work on
all versions of Windows... possibly it isn't
supported on Win98?  That may not be quite right,
but I recall problems doing this in the past.
(Or was it just DOS that failed?)

-Peter



More information about the Python-list mailing list