-
May 30th, 2022, 11:00 AM
#1
Thread Starter
Frenzied Member
sorting by filename length
All,
Sorry, this is not VB, but it is coding adjacent.
I've written an app that adds lengthy text to filenames (with file details).
I want to know if there is a way natively in Windows File Explorer to sort files in a folder by length of filename.
Then I can see which files have been "processed" and which haven't at a glance.
I see tons of attributes in the list view, but I don't see one that refers to name length.
ANybody?
Thanks.
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
May 30th, 2022, 12:37 PM
#2
Re: sorting by filename length
1- Did you write the application in VB6?
2- Are you USING Windows File Explorer to determine something (processed?????), or do you want to see something in VB6 that can provide your list in some sort of order.
3- Provide an example of what two or three of your filenames might look like.
Sam
Sam I am (as well as Confused at times).
-
May 30th, 2022, 01:40 PM
#3
Re: sorting by filename length
In W7, yes (don't have 10 to test).
You go to the directory you want, use View-Details and then on whatever tab appears (date,size,type etc), you right click on in and select "more" . You have a lengthy list over there to select what you want (length is 100% there as I see it right now that I am typing, in XP I think it was size, or something else (I remember starting with D...AH, Duration. It was duration), if by change U use XP). Again not sure for w10 but I don't see what it won't be there.
Last edited by sapator; May 30th, 2022 at 01:43 PM.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
May 30th, 2022, 01:40 PM
#4
Addicted Member
Re: sorting by filename length
AFAIK there is no such an option.
-
May 30th, 2022, 03:25 PM
#5
Re: sorting by filename length
@sapator....if you choose Length (at least in Win 10), and look at the list of files, all "Lengths" are blank....so I don't know what this "Length" is supposed to give you.
@OP....you didn't answer my questions...would be nice to know as I am sure we could figure out something, USING VB6, that is.
Sam I am (as well as Confused at times).
-
May 30th, 2022, 03:54 PM
#6
Re: sorting by filename length
OK.
As I've said I don't have 10 here. After a look around, yes, totally idiotic they removed the feature. You can only do a size: search on the search bar.
However there are some solutions by messing the registry and settings.
Also there is a tool (haven't used) that is called TreeSize and supposedly can help. It's free,so:
Here is all the info: https://www.guidingtech.com/sort-fil...cally-by-size/
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
May 30th, 2022, 04:21 PM
#7
Re: sorting by filename length
If you need indentifiers in your filename, then should build filenames with a logical structure.
Using prefixes, so you can sort alphabetically
-
May 30th, 2022, 06:56 PM
#8
Re: sorting by filename length
Originally Posted by SamOscarBrown
@sapator....if you choose Length (at least in Win 10), and look at the list of files, all "Lengths" are blank....so I don't know what this "Length" is supposed to give you.
It's for multimedia files like videos. Enable the column and browse to a folder that contains videos and you'd see the lengths of the videos show up in the Length column, assuming the correct codecs for the videos are installed.
-
May 31st, 2022, 06:47 AM
#9
Re: sorting by filename length
AH....the LENGTH OF THE VIDEOS!
As Arnie suggests (was my hint question early on), if it IS a VB6 app(lication) then the sensible thing to do is create a filename BASED ON THE LENGTHS (of the videos) that is then sortable WITHIN VB6.
Not sure how many files are in question, but unless it is hundreds, it is easy to use an alphabetical prefix added to the file based upon length 'calculation'. Even hundreds or more can be 'sorted alphabetical'.
Sam I am (as well as Confused at times).
-
May 31st, 2022, 06:51 AM
#10
Re: sorting by filename length
But who wants to sort in Explorer on the length of filename, that's a complete idiotic request
If you store all kind of information in filenames then you are creating a kind of pseudo database table.
What's next? Sort on the 3rd word in a filename?
-
May 31st, 2022, 06:53 AM
#11
Re: sorting by filename length
In Win 10, adding that LENGTH column to VIEW tab, one might get something like this, sorted by LENGTH:
So, YES, you can.
Last edited by SamOscarBrown; May 31st, 2022 at 06:57 AM.
Sam I am (as well as Confused at times).
-
May 31st, 2022, 08:26 AM
#12
Re: sorting by filename length
That's the length of an Audio or Video file. Not the length of the filename
And you can write extensions for Explorer, never felt the need myself but it can be done.
https://docs.microsoft.com/en-us/win...shell/handlers
-
May 31st, 2022, 08:46 AM
#13
Re: sorting by filename length
Again, not my turf on W10 but anyone tried "TreeSize" ?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
May 31st, 2022, 11:55 AM
#14
Thread Starter
Frenzied Member
Re: sorting by filename length
All, thanks for the replies.
Yes, Length refers to the time length of multimedia.
I can't order alphabetically because all of the information tags on the filename come after the original filename.
I can definitely do this programmatically in VB6 with the FSO.
I'm trying to have a quick way in the Windows file explorer to just look at the files in the folder in order by name length. I think, as one person has said, it simply does not exist.
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
May 31st, 2022, 12:00 PM
#15
Re: sorting by filename length
Windows Explorer has a billion ways to sort files but for some reason the one thing no one thought of was sorting by file name length.
-
Jun 5th, 2022, 01:23 AM
#16
Re: sorting by filename length
Windows Explorer has 3 ways to sort files (not count ascending vs descending), 1 per column. A column is flagged as either a string (sorted with StrCmpLogicalW), a number (where it sorts by the raw unformatted number), a date, or enumerated groups (there's also boolean but it's not implemented). There's some subtypes and control-displaying ones but they sort indistinguishably from those.
There's hundreds of properties, but they all sort as 1, and only 1, of those 4 ways.
Enumerated groups I'm not even sure should be counted as separate; the only sort difference I'd have to check whether ranged values are sorted by any in the range or just as raw values. I've never seen this implemented anywhere besides the Rating column that shows those stars.
You *could* however, add FileNameLength as a column, and sort by that, by creating a shell extension-- a Property Handler (or on XP, a Column Handler). You cannot do this in .NET or other managed code, you'd have to use something like VB6 or C/C++.
https://stackoverflow.com/questions/...ndows-explorer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|