Find files by filename length

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Lare2
Junior Member
Junior Member
Posts: 15
Joined: 2010-12-05, 07:59 UTC

Find files by filename length

Post by *Lare2 »

I renamed tons of picture files by its MD5 check-sum. I know i probably missed some of them.

Is there a way for me to search for any file where its filename does not equal 32 characters.

I know nothing about Regular Expressions, so don't know if something like this can be accomplished by it.
umbra
Power Member
Power Member
Posts: 876
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Hi, Lare2. Yes, it can be done using RegEx:
1. Open Find Files
2. Select a proper directory
3. Switch to Plugins tab
4. Select Plugin:tc ; Property:name ; OP:!regex ; Value:^.{32}$
5. Start search

note: to put it simply, '.{32}' means 'a sequence of 32 characters' ; '^' and '$' around it means 'and nothing else'

edit: fixed a typo
Last edited by umbra on 2012-05-22, 08:47 UTC, edited 1 time in total.
Windows 10 Pro x64, Windows 11 Pro x64
User avatar
white
Power Member
Power Member
Posts: 6022
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Find files by filename length

Post by *white »

Lare2 wrote:Is there a way for me to search for any file where its filename does not equal 32 characters.

I know nothing about Regular Expressions, so don't know if something like this can be accomplished by it.
Match between start en end of the file name a string of 1 to 31 characters or a string of 33 or more characters:

Code: Select all

^(.{1,31}|.{33,})$

^      matches start of the file name
.      matches any character
{n,m}  repeat n to m times
(n|m)  match expression n or expression m
$      matches end of the file name
umbra wrote:4. Select Plugin:tc ; Property:name ; OP:regex ; Value:^.{32}$
You mean of course: "OP:!regex"
umbra
Power Member
Power Member
Posts: 876
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

You mean of course: "OP:!regex"
Of course, my bad.
Windows 10 Pro x64, Windows 11 Pro x64
User avatar
Stiltzkin
Member
Member
Posts: 196
Joined: 2004-09-10, 17:15 UTC

Post by *Stiltzkin »

Lare2
Junior Member
Junior Member
Posts: 15
Joined: 2010-12-05, 07:59 UTC

Post by *Lare2 »

I knew the master users of TC would know the answer.

I will give it a try as soon as I come back to my computer. I just logged in from my tablet to thank you all for the help.

I'll report back soon
Post Reply