Page 1 of 1

Remove blank space in front of file name

PostPosted: Sat May 27, 2017 1:51 pm
by jrstech
I have about 1200 files that begin with a blank space. When trying to remove it with Remove (5) command it either will remove all spaces or first character of file name. Is there a filter that need to be applied? Any help appreciated.

Re: Remove blank space in front of file name

PostPosted: Sat May 27, 2017 8:39 pm
by KenP
If all the file-names start with a blank space "Remove (5) / First n: 1" should do it, but that will of course remove the first character of any file-names that do not start with a blank space.



Alternatively you could filter the files so only the file-names that start with a blank space show.

Filters (12)
Mask: ^\s+.*
RegEx: Selected



Alternatively, and I think this would be my personal preference, you could use regex.

RegEx (1)
Match: ^\s+(.*)
Replace: \1

This will only affect file-names that start with a blank space.

Re: Remove blank space in front of file name

PostPosted: Sun May 28, 2017 4:43 pm
by jrstech
Thanks for the input. I was able to get it resolved just by checking "Trim" without specifying anything else but I'll try your solution next time. Thx again.