Re: Script to rename all filenames in a directory to use ALL…

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Stephen P Rufle
Datum:  
To: Main PLUG discussion list
Betreff: Re: Script to rename all filenames in a directory to use ALL CAPITAL LETTERS
This is how I was doing it before I saw the one liner

<snip>
#!/usr/local/bin/python
# ren_to_upper.py
import os

for fname in os.listdir(os.getcwd()):
    newfname = fname.upper()
    os.rename(fname, newfname)
</snip>
---------------------------------------------------
PLUG-discuss mailing list - 
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss