Remove all before _-_ in multiple file names in multiple folders and child folders?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Belinea
Junior Member
Junior Member
Posts: 2
Joined: 2024-02-17, 01:07 UTC

Remove all before _-_ in multiple file names in multiple folders and child folders?

Post by *Belinea »

Windows 10
Total Commander V11.02

I am fairly new to TC I am having an issue getting TC to do what I need so I am unsure if it is possible.

I have multiple files (10.000+) that have the name structure "abcdef_-_12345678.txt in multiple folders with child folders. S
ome of the child folders also have child folders.

I have the need to remove all characters before and including "_-_"so that each file name then looks like 12345678.txt.

The number of characters before "_-_" varies and has no fixed character count.


Here is what I have tried...

I open TC and in the left hand pane I navigate to the root folder within which the multiple folders with files are placed.

I then CTRL+A to select all of the folders.

I then CTRL+M.

In the Search for box I type *_-_
In the Repace with box I select <Clear>

I then click the start button

Nothing happens and when I check the files in various folders their names have not been changed.

Can TC do this or am I doing something wrong?

Many thanks
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Remove all before _-_ in multiple file names in multiple folders and child folders?

Post by *white »

First use Alt+F7 (Search) and search for _-_
Then click the "Feed to listbox" button to feed the result to the file panel
Then follow the steps you did yourself: Ctrl+A, Ctrl+M, Search for *_-_ and Replace with (nothing) and click Start button
Belinea
Junior Member
Junior Member
Posts: 2
Joined: 2024-02-17, 01:07 UTC

Re: Remove all before _-_ in multiple file names in multiple folders and child folders?

Post by *Belinea »

Hi White.

Thank you and it worked perfectly.

TC seems so powerful and packed with features that I would not have been able to work out those first steps,
"First use Alt+F7 (Search) and search for _-_
Then click the "Feed to listbox" button to feed the result to the file panel".

Thank you again. :D

Bel
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Remove all before _-_ in multiple file names in multiple folders and child folders?

Post by *Fla$her »

Belinea wrote: 2024-02-17, 12:37 UTC "First use Alt+F7 (Search) and search for _-_
Then click the "Feed to listbox" button to feed the result to the file panel".
Instead, you can use Ctrl+F12 (*_-_*) and Ctrl+B.
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Remove all before _-_ in multiple file names in multiple folders and child folders?

Post by *sa16 »

2Belinea
You can also: Ctrl+B, Ctrl+A, Ctrl+M.
Post Reply