Skip to content

Commit

Permalink
Script para renomear form.gsp para _form.gsp
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoldomt committed Jun 4, 2012
1 parent c367836 commit 29b8ac3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions renomear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
basename="form.gsp"
newname="_form.gsp"
for dirpath, dirs, files in os.walk(os.getcwd()):
for filename in files:
if filename==basename:
filepath = os.path.join(dirpath, filename)
new_filepath = os.path.join(dirpath, newname)
try:
os.rename(filepath, new_filepath)
except OSError, ex:
print >>sys.stderr, "Error renaming '%s': %s" % (filepath, ex.strerror)

0 comments on commit 29b8ac3

Please sign in to comment.