Learning Scientific Programming with Python (2nd edition)

P4.4.4: Batch renaming of files

Question P4.4.4

Modify the program of Example E4.16 to catch the following errors and handle them gracefully:

Your program should terminate in the first two cases and skip the file in the second two.