Can we have an option to search for filenames with case-sensitivity?
Sometimes, even on case-insensitive filesystems, I want to search for those files with all-uppercase extensions and fix them. For neatness and OCD.
The current workaround is to use a plugin-but-not-really-because-its-built-in search with tc->fullname, and use "cont.(case)". But really, a checkbox on the main page would be much easier.
Before you start "hey, you're on Windows, which is NTFS or FAT32 or exFAT, which is case-insensitive, and TC just follows that", it doesn't. I'm on my NAS, which is Ext4, which is case-sensitive, and TC ignores it (well it probably can't know what FS is behind a samba share, and/or whether that FS is case-sensitive).
Case sensitive search
Moderators: white, Hacker, petermad, Stefan2
case-sensitivity file name search upper case lower case sear
Hi Thany
you could also just utilize RegEx search
Find: (?-i)XLS|TXT|DOC
[x]RegEx
Or for any extension:
Find: (?-i)\.[A-Z][A-Z][A-Z]$
Find: (?-i)\.[A-Z]+$
[x]RegEx
To read more, press F1-key in Search dialog
- click at 'regular expressions' of "RegEx Search in file names using regular expressions."
- scroll down to "Modifiers are used for changing behaviour of regular expressions."
(?i) Ignore Upper-/lowercase. In Total Commander, this is the default for file names.
(?-i) Case-sensitive matching.
HTH?
you could also just utilize RegEx search
Find: (?-i)XLS|TXT|DOC
[x]RegEx
Or for any extension:
Find: (?-i)\.[A-Z][A-Z][A-Z]$
Find: (?-i)\.[A-Z]+$
[x]RegEx
To read more, press F1-key in Search dialog
- click at 'regular expressions' of "RegEx Search in file names using regular expressions."
- scroll down to "Modifiers are used for changing behaviour of regular expressions."
(?i) Ignore Upper-/lowercase. In Total Commander, this is the default for file names.
(?-i) Case-sensitive matching.
HTH?
Re: Case sensitive search
In fact it is not really a TC issue but more a samba issue, on my share i set in samba smb.conf :Thany wrote:...
Before you start "hey, you're on Windows, which is NTFS or FAT32 or exFAT, which is case-insensitive, and TC just follows that", it doesn't. I'm on my NAS, which is Ext4, which is case-sensitive, and TC ignores it (well it probably can't know what FS is behind a samba share, and/or whether that FS is case-sensitive).
case sensitive=no
short preserve case = no
Windows is agnostic to case even if it is able to show / create using different case is not able to detect/prevent name collision this can lead to funny behaviors...
Re: case-sensitivity file name search upper case lower case
Well, I suppose it's a viable workaround. Regexes are too clunky to do a quick search for a pattern so easy to type like "w*.xls;words.*"Stefan2 wrote: you could also just utilize RegEx search
Find: (?-i)XLS|TXT|DOC
[x]RegEx
I'm not saying it's an issue, I'm saying it's a missing feature. It can't be too hard to search case-sensitively. Before comparing: instead of upper- or lowercasing everything, just, you know, don't. And it'll be case-sensitive. It's the simplest comparison form I can think of.nsf wrote: In fact it is not really a TC issue but more a samba issue
So what I'm saying is, don't point fingers at other systems, and then hope that TC will magically pick it up. And on top of that, I want to case-sensitively search on a FS that isn't. Is that too much asked?
If I can draw any kind of conclusion from this: clearly, regex search can be case-sensitive, so why can't pattern search do the same?
Re: case-sensitivity file name search upper case lower case
No. Go ahead.Thany wrote:Is that too much asked?
I guess it's just not of that much use for on WindowsTM systems
so the author wants to bother the majority with not need features
in direct front of them, that's all.
And we have seen two usable workarounds in this thread already.
Re: case-sensitivity file name search upper case lower case
Usually pattern search is handled by Windows system FindFirstFileEx and the O.S. as said do not care of case...Thany wrote:....
If I can draw any kind of conclusion from this: clearly, regex search can be case-sensitive, so why can't pattern search do the same?
You can use everything with case: modifier from TC search but the search syntax nead some learning curve..
Code: Select all
ed: case:<*.ZIP|*.RAR>
@Stefan2
The thing is, case-insensitive searching takes more work. You need to upper/lowercase both strings when comparing. Just *not* doing that will make a comparison case-sensitive. It absolutely, really, honestly, genuinely is that simple.
@nsp
FindFirstFileEx is apparently not good enough. But for other types of searches (regex) this can't be used, so why use it in one situation, and use a different function in a different situation. I say, never use something that works only half the time. Use the same function for searching by regex, because it already knows about case. Only adapt it to also know how to compare patterns.
And honestly, file patterns are incredibly simplistic. Shouldn't take much work to compare them "manually" in code.
The thing is, case-insensitive searching takes more work. You need to upper/lowercase both strings when comparing. Just *not* doing that will make a comparison case-sensitive. It absolutely, really, honestly, genuinely is that simple.
@nsp
FindFirstFileEx is apparently not good enough. But for other types of searches (regex) this can't be used, so why use it in one situation, and use a different function in a different situation. I say, never use something that works only half the time. Use the same function for searching by regex, because it already knows about case. Only adapt it to also know how to compare patterns.
And honestly, file patterns are incredibly simplistic. Shouldn't take much work to compare them "manually" in code.