Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts/rmext.py
diff options
context:
space:
mode:
authorNathanaël Lécaudé <Nat@localhost.localdomain>2007-01-07 21:00:55 (GMT)
committer Nathanaël Lécaudé <Nat@localhost.localdomain>2007-01-07 21:00:55 (GMT)
commit94c957d498aa11b827582c3537a604603fd69a20 (patch)
tree3c928820754b721a28cdd0e859a5fdef1fc233c0 /scripts/rmext.py
parentef81b6bba7cf42258625ebad1a92a2472d1b13ae (diff)
Added rmext.py in Utils to remove extensions in a folder
Diffstat (limited to 'scripts/rmext.py')
-rw-r--r--scripts/rmext.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/rmext.py b/scripts/rmext.py
new file mode 100644
index 0000000..91373e5
--- /dev/null
+++ b/scripts/rmext.py
@@ -0,0 +1,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'