import os L = os.listdir('.') for x in L: print '!'+x+'!'+x[0] if x != 'rename.py': y = 'Kapustin (Hamelin): '+x os.rename(x,y) I get Traceback (most recent call last): File "<stdin>", line 9, in ? OSError: [Errno 22] Invalid argument TIA, jb