| Revision: | 591 |
| Committed: | Tue Nov 3 22:45:12 2015 UTC (10 years, 4 months ago) by nino.borges |
| Content type: | text/x-python |
| File size: | 323 byte(s) |
| Log Message: | Moved dir out of main dir. |
| # | 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 |