On Oct 31, [EMAIL PROTECTED] wrote: > ... > obs: the file names came this way(with spaces or apostrophes) from > the cd i imported.
So remove them first. Here's a possible solution:: #! /usr/bin/env python import glob, os.path uglies = glob.glob("*.mp3") print 'uglies:', uglies pretties = [] for ugly in uglies: song, ext = os.path.splitext(ugly) song = song.replace("'", "") song = song.replace(" ", "_") song = song.title() song = "The_Beatles_-_" + song[3:] song_ext = song + ext pretties.append(song_ext) print 'pretties:', pretties # rename uglies to pretties... -- _ _ ___ |V|icah |- lliott http://micah.elliott.name [EMAIL PROTECTED] " " """ -- http://mail.python.org/mailman/listinfo/python-list