Capitalize all folder names with python

#!/usr/bin/python

import commands
import os

x = commands.getoutput('ls')

for y in x.split():
z = y.capitalize()
if y != z :
....cmdr = "mv " + y + " " + z
....print cmdr
....os.system(cmdr)

1 comment:

JamBoxes.net said...

Hey Beau,

I was referred to you by Surya Buchwald, but he didn't have any contact info for you except this blog. I'm looking for someone to provide visuals at a party I'm hosting this Saturday night in SanFrancisco. If you are interested in participating, please contact me ASAP at moldover@moldover.com

Thanks!
Moldover