Filename Length Column in List

Features wanted...
Post Reply
DonBeaton
Posts: 3
Joined: 12 Aug 2009 20:16

Filename Length Column in List

Post by DonBeaton »

I wish XYplorer had the option of displaying the length of the filename in a column in the List.
The length would be the number of characters in the filename, including 1 for the "Period" + the number of characters in the extension.
The length would not include the directory portion of the path.
Benefit: I recently uploaded files to two companies which had filename limits of 70 and 100 characters. I had to shorten my filenames in order to upload them. It would have made the job easier if the XYplorer List had a column which showed the filename length.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Filename Length Column in List

Post by jupe »

This is already possible with a scriptable custom column, you would just need something like this
return strlen(<cc_name>); as the script.

How to use custom columns,

https://www.xyplorer.com/release_13.90. ... bleColumns

DonBeaton
Posts: 3
Joined: 12 Aug 2009 20:16

Re: Filename Length Column in List

Post by DonBeaton »

Thankyou jupe for the good advice.

For beginner scripters (like me), here is the procedure for creating a column that shows FileNameLength:

Open Tools menu | Configuration | Custom Columns, and dbl-click the first "Undefined" item in the "Custom Columns Definitions" list. This will open the Configure Custom Column dialog.

Caption: fLen
Type: Script
Script: return strlen(<cc_name>);
Format: Text
Trigger: Browse
Item type: Files <WARNING: if you choose "Files and Folders", you will get the wrong length>
Item filter: <This field is blank>
[OK]
[OK]

In List, Rt-click any column header | Add Column
Right click new column header (which says "Right-click here...") | Select Custom Column...
Select "fLen, Script (*.*)"
[OK]

WARNING: Values in your new column (fLen) do not update automatically.
To update manually:
- click F5
- right-click fLen column header > Refresh Column
- restart XYplorer

XYplorer will not allow you to create filenames longer than 255 characters.

Horst
Posts: 1085
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Filename Length Column in List

Post by Horst »

DonBeaton wrote: 30 Oct 2021 03:28 XYplorer will not allow you to create filenames longer than 255 characters.
No, it should not.
File names longer than 255 are illegal.
Only pathnames can be much longer but never a file name.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Filename Length Column in List

Post by highend »

XYplorer will not allow you to create filenames longer than 255 characters.
255 for the filename without the path? No, it doesn't. It's a NTFS restriction. Apart from that it supports longer names: Configuration | General | Controls & More | Miscellaneous | Support overlong filenames
One of my scripts helped you out? Please donate via Paypal

Post Reply