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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Stephen P Rufle
Date:  
To: Main PLUG discussion list
Subject: 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