Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Find files by filename length

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
Lare2
Junior Member
Junior Member


Joined: 05 Dec 2010
Posts: 5

PostPosted: Tue May 22, 2012 2:04 am    Post subject: Find files by filename length Reply with quote

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.
Back to top
View user's profile Send private message
umbra
Power Member
Power Member


Joined: 14 Jan 2012
Posts: 675

PostPosted: Tue May 22, 2012 2:23 am    Post subject: Reply with quote

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
_________________
Windows 7 Pro x64, Windows 8 Pro x64


Last edited by umbra on Tue May 22, 2012 2:47 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
white
Power Member
Power Member


Joined: 19 Nov 2003
Posts: 1323
Location: Netherlands

PostPosted: Tue May 22, 2012 2:42 am    Post subject: Re: Find files by filename length Reply with quote

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:
^(.{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"
_________________
#16626 Personal licence
Back to top
View user's profile Send private message Send e-mail
umbra
Power Member
Power Member


Joined: 14 Jan 2012
Posts: 675

PostPosted: Tue May 22, 2012 2:46 am    Post subject: Reply with quote

Quote:
You mean of course: "OP:!regex"
Of course, my bad.
_________________
Windows 7 Pro x64, Windows 8 Pro x64
Back to top
View user's profile Send private message Send e-mail
Stiltzkin
Junior Member
Junior Member


Joined: 10 Sep 2004
Posts: 60

PostPosted: Tue May 22, 2012 4:37 am    Post subject: Reply with quote

there's also: http://www.totalcmd.net/plugring/wdx_Filename_ChrCount.html
Back to top
View user's profile Send private message
Lare2
Junior Member
Junior Member


Joined: 05 Dec 2010
Posts: 5

PostPosted: Tue May 22, 2012 6:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group