1. James Mills
  2. tools

Commits

James Mills  committed 66b46a6 Merge
  • Participants
  • Parent commits fe52c53, 02a304b
  • Branches default

Comments (0)

Files changed (1)

File renameext

View file
+#!/usr/bin/env python
+
+import sys
+from os import rename
+from os.path import splitext
+
+
+ext = sys.argv[1]
+files = sys.argv[2:]
+
+for file in files:
+    old = splitext(file)
+    new = (old[0], ext,)
+    rename("".join(old), "".join(new))