Toggle File Extensions from Toolbar
-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
Toggle File Extensions from Toolbar
I'm new to XYplorer and would like to set this up similar to my OpenShell layout. All I'm missing is a toolbar button to enable/disable displaying file extensions. I can't find a button for that. I see an option for custom buttons but I don't know how to set that up.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Toggle File Extensions from Toolbar
Add a "User Button #..." to the toolbar and use this script
Code: Select all
$layoutFile = "<xydata>\Columns\Toggle extension column.txt";
$layoutText = columnlayout(, "get");
// No ext column
if (!regexmatches($layoutText, "(^|,)\+Ext\.")) {
$layoutText = regexreplace($layoutText, "Ext\.", "+Ext.", 1)
// Ext column
} else {
$layoutText = regexreplace($layoutText, "\+Ext\.", "Ext.", 1)
}
writefile($layoutFile, $layoutText, , "utf8");
columnlayout($layoutFile);
One of my scripts helped you out? Please donate via Paypal
-
Horst
- Posts: 1419
- Joined: 24 Jan 2021 12:27
- Location: Germany
Re: Toggle File Extensions from Toolbar
And why do you want to hide extensions ?
From the security aspect this should never be hidden.
It was a very bad design idea from Microsoft to have such an option in Explorer.
From the security aspect this should never be hidden.
It was a very bad design idea from Microsoft to have such an option in Explorer.
Windows 11 Home, Version 26H2 (OS Build 26300.10075)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1424b (x64), Everything Toolbar 3.5, Listary Pro 7.1.0.47 beta
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1424b (x64), Everything Toolbar 3.5, Listary Pro 7.1.0.47 beta
-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Toggle File Extensions from Toolbar
Execute this from the address bar and show the complete output of it:
text columnlayout(, "get");One of my scripts helped you out? Please donate via Paypal
-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
Re: Toggle File Extensions from Toolbar
Code: Select all
Index.56,Path.150,+Name.300,+Ext.43,+Size.62,+Type.120,+Modified.115,+Created.115,Accessed.115,Attr.80,Len.47,Label.56,Tags.53,Comment.82,Extra 1.64,Extra 2.64,Extra 3.64,Extra 4.64,Extra 5.64,Custom 1.79,Custom 2.79,Custom 3.79,Custom 4.79,Custom 5.79,Extra 6.64,Extra 7.64,Extra 8.64,Extra 9.64,Extra 10.64,Extra 11.64,Extra 12.64,Extra 13.64,Extra 14.64,Extra 15.64,Extra 16.64-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Toggle File Extensions from Toolbar
On hitting the button it should hide your Ext column (in the state you're posted it) and that works fine in a test setup here...
So your button setup looks like this?
So your button setup looks like this?
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
Re: Toggle File Extensions from Toolbar
This is what I've got.
To see the attached files, you need to log into the forum.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Toggle File Extensions from Toolbar
Execute the button once,
Menu - Go - Go to Application Data Folder
Navigate into the "Columns" subfolder, open the "Toggle extension column.txt" with a text editor, show the content.
Close that file, press the button again, open the file, show the content a second time...
Menu - Go - Go to Application Data Folder
Navigate into the "Columns" subfolder, open the "Toggle extension column.txt" with a text editor, show the content.
Close that file, press the button again, open the file, show the content a second time...
One of my scripts helped you out? Please donate via Paypal
-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
Re: Toggle File Extensions from Toolbar
The contents in the file change each time but the button still has no affect on the file extensions.
-
jupe
- Posts: 3570
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Toggle File Extensions from Toolbar
If you just want to toggle showing the file extension from the end of the filename, NOT toggle the actual Ext column all you would need in the on left click field of the custom toolbar button is this by itself:
#412;-
ovalseven
- Posts: 16
- Joined: 14 Jun 2021 18:22
Re: Toggle File Extensions from Toolbar
This does what I was trying to accomplish. Thank you.
Sorry if my initial question wasn't clear.
XYplorer Beta Club