As in the topic title.
Spaces, dots, underscores and other user-defined characters will be removed only when they are at the beginning or the end of filenames.
The operation should be repeated if there are more than one leading/ending spaces.
For user-defined characters to remove, a special type-in form could be provided.