(search, ex, dest_path)
| 49 | |
| 50 | |
| 51 | def rename(search, ex, dest_path): |
| 52 | count = 0 |
| 53 | os.chdir(dest_path) |
| 54 | for filename in os.listdir(): |
| 55 | if filename.find(search, 0, len(search) - 1): |
| 56 | count = count + 1 |
| 57 | |
| 58 | return search + str(count) + "." + ex |
no outgoing calls
no test coverage detected