Your file name looks like this? "Bank statement .pdf". You want to get rid of the trailing space between the word "statement" and ".pdf", but you want to retain the space between "Bank" and "statement".
If you wish to remove a leading space (instead of a trailing space), in the file name, you will be able to easiily do it once you understand the below procedure.
You need the "Full Name" condition and the "Rename" action.
Your rule is going to look like this:
In the image above, I have created a custom token called "Start of file name".
You will notice above that that in the "match" condition there is a space before the ".pdf"
Here is how you create the custom token.
Click on "Custom Text" as per the image below
Give it a name as per the image below. I called the token "Start of filename"
Click on "Anything" as per the image below.
now click "Done" twice.
Next add the "space" followed by .pdf. like this:
Finally under "Full Name matches" click the token "Start of filename", followed by ".pdf" as below.
Click "Done", and run your rule. It will remove any trailing space in the monitored folder.
I assumed that the file name ends in ".pdf". If you want to do the same for any extension simply replace ".pdf" with the token "extension" as shown in the first photo above.