[ACCEPTED]-The last character in a folder name can't be replaced-rename

Accepted answer
Score: 12

You are getting this exception because you 7 have a space as the last character in your 6 file name and underlying OS (Windows) will 5 not accept a file name with a trailing space 4 character.

This space as a trailing character 3 is most likely result of multiple String#replace calls, make 2 sure you don't replace very last char in 1 the String with space.

More Related questions