blob: 91373e5b395274cc7eef8bf0662c703d8266879c (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import os
import sys
if len(sys.argv) > 1:
path = sys.argv[1]
l = os.listdir(path)
for elem in l:
os.rename(path + elem , path + os.path.splitext(elem)[0])
else:
print 'Please input a path'
|