Need a manual on file masks for search or filter - SOLVED

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
nemadeka
Junior Member
Junior Member
Posts: 79
Joined: 2009-04-26, 19:44 UTC

Need a manual on file masks for search or filter - SOLVED

Post by *nemadeka »

Good day,
I have mixed my music files together, half of them are normally named mp3 files, the other half have "randomized" file names, i.e. I used a renamer tool and added random uppercase and lowercase letters plus " - " at the beginning of the file.

Examlpes:
"normal" file name --> Abba - I Have A Dream.mp3
"randomized" file name --> DoRKVMVQ - Traveling Wilbury's - End Of The Line.mp3

I need to somehow separate them, using masks which work in MS Word F/R did not help.
Reading TC help did not help.

Please kindly advise.
Thank you
Last edited by nemadeka on 2022-05-13, 11:27 UTC, edited 1 time in total.
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Need a manual on file masks for search or filter

Post by *white »

Does searching for filenames with two dashes in them help? You can do that with regular expressions (RegEx). Try searching for:

Code: Select all

Search for:  -.*-

(RegEx: Enabled)
To remove the random part using multi-rename tool you, try:

Code: Select all

Search for:    ^.*?-\s*(.*-)
Replace with:  $1

(RegEx: Enabled)
nemadeka
Junior Member
Junior Member
Posts: 79
Joined: 2009-04-26, 19:44 UTC

Re: Need a manual on file masks for search or filter

Post by *nemadeka »

Thanks a lot for the tips!

Tip 1 worked perfectly - I found all the "randomized" tracks and moved them to a separate directory.
Tip 2 is saved for the future, because my intention is to "randomize" the remaining "normal" tracks, because the player which I use has obvious problems with "random play", it repeats some tracks too often.

Could you add to my happiness and suggest a reading on RegEx which is applicable to TC? (Not critical though.)

Thanks again, stay safe and have a great weekend! :^)
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Need a manual on file masks for search or filter

Post by *white »

white wrote: 2022-05-12, 07:53 UTC Does searching for filenames with two dashes in them help? You can do that with regular expressions (RegEx).
You can also use normal search for that. Search for:

Code: Select all

*-*-*
nemadeka wrote: 2022-05-12, 06:55 UTC I have mixed my music files together, half of them are normally named mp3 files, the other half have "randomized" file names, i.e. I used a renamer tool and added random uppercase and lowercase letters plus " - " at the beginning of the file.
nemadeka wrote: 2022-05-13, 11:27 UTC Tip 2 is saved for the future, because my intention is to "randomize" the remaining "normal" tracks, because the player which I use has obvious problems with "random play", it repeats some tracks too often.
Do you know you can also use Total Commander for that?
One lesser known feature of Total Commander is that it is able to generate random numbers.
HISTORY.TXT wrote:10.02.10 Added: Internal content plugin field "Random number", generating a pseudo-random number (not cryptographically strong) between 0 and 99999. Useful e.g. to sort music files by random numbers.
In the Multi-Rename Tool you could do something like this:
Add a 10 digit random number in front of the file name. If there are now 2 random numbers, remove the second number.
So this would re-randomize the numbers and add a number if there was none.

Code: Select all

Rename mask:
File name:  [=tc.random number:01-5][=tc.random number:01-5] - [N]
Extension:  [E]

Search & Replace
Search for:    ^(\d+\s*-)\s*\d+\s*-
Replace with:  $1
(RegEx: Enabled)
(Subst: Disabled)
With Total Commander 10.50 you can even rename files with a click of a button.

If you use Total Commander as a music player you can use Custom Columns Mode and define a column with random numbers and sort on that. Then the order would be randomized every time you enter the folder.
nemadeka wrote: 2022-05-13, 11:27 UTC Could you add to my happiness and suggest a reading on RegEx which is applicable to TC? (Not critical though.)
I suggest you start by reading Total Commander's Help.
You can use the Multi-Rename Tool to experiment. It shows the results as you type and as long as you do not click start, nothing gets renamed. (And if you do click Start, you can click Undo.)
nemadeka
Junior Member
Junior Member
Posts: 79
Joined: 2009-04-26, 19:44 UTC

Re: Need a manual on file masks for search or filter - SOLVED

Post by *nemadeka »

Thanks a lot for your input, I really appreciate your generous help.
TC's help is very modest, I was not able to find helpful data, and had to resort to forum's help.
It should be noted that I am not a very inexperienced user, I even wrote a freeware VBA utility which uses a sort of scripting language for running find/replace passes in MS Word.
(https://enru.nemadeka.com/tagger.htm)
Very simple, very basic, but its manual is 27 pages long and is full of examples. The manual is often as important as the software, or maybe even more.
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Need a manual on file masks for search or filter - SOLVED

Post by *white »

nemadeka wrote: 2022-05-25, 16:32 UTC TC's help is very modest, I was not able to find helpful data, and had to resort to forum's help.
TC's help refers at the the bottom to https://regex.sorokin.engineer/
Have you looked at that too?
nemadeka
Junior Member
Junior Member
Posts: 79
Joined: 2009-04-26, 19:44 UTC

Re: Need a manual on file masks for search or filter - SOLVED

Post by *nemadeka »

No, I missed it, thanks a zillion for letting me know! :^)
Post Reply