Custom column for drive letter with virtual folders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Custom column for drive letter with virtual folders

Post by kiwichick »

I've created a custom column which displays the drive letter of files and folders. The code is:

Code: Select all

$drive = getpathcomponent(, "Drive");
 return $drive;
It works fine for normal folders. However, I want to use it for my virtual folders so I know which drive a particular item is on but it doesn't work. Instead of displaying the drive letter, the column displays all the paths of the virtual folder. Is there something I'm not doing right, or is it not possible for virtual folders?

2024-10-20_150435.png
2024-10-20_150435.png (43.85 KiB) Viewed 1465 times

The custom column settings are:

2024-10-20_151535.png
2024-10-20_151535.png (10.4 KiB) Viewed 1465 times
Windows 10 Pro 22H2

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

Re: Custom column for drive letter with virtual folders

Post by jupe »

try...

return gpc(<cc_item>, "drive");

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Custom column for drive letter with virtual folders

Post by kiwichick »

jupe wrote: 20 Oct 2024 05:25 try...

return gpc(<cc_item>, "drive");
Perfect!!! Thank you very much :biggrin:
Windows 10 Pro 22H2

Post Reply