Deleting empty spaces at beginning of file names?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Flourgrader
Posts: 94
Joined: Fri May 28, 2021 7:55 am

Deleting empty spaces at beginning of file names?

Post by Flourgrader »

Hi All,
I have a huge bunch of files in one single folder.
They are all mp3 files.
A few hundred of them have an empty space before the file name.
So as an example:
Abba - Money, Money, Money.mp3
There would be a space before Abba.
Is there a way to List every single file that meets these criteria?
then delete the empty spaces.
Thank You. :)
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: Deleting empty spaces at beginning of file names?

Post by therube »

regex:^\s
, says to find file (or directory) names that start with a space \s.


Once found, select the ones you want to rename, Shift+F2, then in the New Format: box of the dialog, simply remove the opening space in the New Format: box.

(Then hit, OK.)


Start small, experiment, understand just what is going on.
There isn't a whole lot in the way of "safety checks", so an inadvertent <CR>...

(Though Everything 1.5alpha does have some Undo (Ctrl+Z & Ctrl+Shift+Z) actions.)


(You can extend the above to one or more spaces, with:
regex:^\s+
.)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Deleting empty spaces at beginning of file names?

Post by NotNull »

or:

Code: Select all

startwith:" "
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Deleting empty spaces at beginning of file names?

Post by raccoon »

I'm not certain Shift+F2 is bound to Advanced Rename by default. If not, go to Edit -> Advanced -> Advanced Rename.

If it is the default now, sorry.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: Deleting empty spaces at beginning of file names?

Post by void »

I will add Shift+F2 as the default shortcut for the Advanced Renamer.

shorthand search to find files starting with a space:

^:" "

^: = match start of filename.
" " = match a literal space.

-or-

" *"
Flourgrader
Posts: 94
Joined: Fri May 28, 2021 7:55 am

Re: Deleting empty spaces at beginning of file names?

Post by Flourgrader »

Thank you All, for your reply's and advice... :)
Post Reply