Rename Directories Only where first Character is " " (Trim)

Bulk Rename Utility How-To's

Rename Directories Only where first Character is " " (Trim)

Postby john.samuel » Thu Oct 29, 2020 3:44 pm

Hiya,

I need to rename some folders, I need to remove the first space (if it exists) in a folder or file name but no more.

All of the playing I've done thus far keeps removing spaces deeper into the file name, how do I restrict the repalce function to operate on the first character only?

I've searched, read, played and got myself in a knot. . .

thank you in advance !
Cheers
john.samuel
 
Posts: 2
Joined: Thu Oct 29, 2020 3:35 pm

Re: Rename Directories Only where first Character is " "

Postby therube » Thu Oct 29, 2020 4:08 pm

Trim - Remove leading and trailing spaces.

5:Remove -> Trim
(assuming you don't care about removing trailing spaces also (should they happen to exist)
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Rename Directories Only where first Character is " "

Postby john.samuel » Thu Oct 29, 2020 5:37 pm

Absolutely PERFECT !

Thank you !

Cheers
John
john.samuel
 
Posts: 2
Joined: Thu Oct 29, 2020 3:35 pm


Return to How-To