| Revision: | 8 |
| Committed: | Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges |
| Content type: | text/x-python |
| Original Path: | Python/NinoCode/MW/PS_Rename.py |
| File size: | 323 byte(s) |
| Log Message: | Initial Import |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | ninoborges | 8 | ## A little program that will remove a digit from a file name. |
| 2 | ## EBorges | ||
| 3 | |||
| 4 | import os | ||
| 5 | |||
| 6 | # this one will remove the 6th digit | ||
| 7 | myPath = r"\\jac\office\sw\BOAAMBAC.0\IMAGES\key_docs\Box002\Dir02" | ||
| 8 | for file in os.listdir(myPath): | ||
| 9 | os.rename(myPath + '\\' + file, myPath + '\\' + file[:5] + file[6:]) | ||
| 10 | print file |