Page 1 of 1

Custom column for drive letter with virtual folders

Posted: 20 Oct 2024 04:19
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

The custom column settings are:

2024-10-20_151535.png

Re: Custom column for drive letter with virtual folders

Posted: 20 Oct 2024 05:25
by jupe
try...

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

Re: Custom column for drive letter with virtual folders

Posted: 21 Oct 2024 00:59
by kiwichick
jupe wrote: 20 Oct 2024 05:25 try...

return gpc(<cc_item>, "drive");
Perfect!!! Thank you very much :biggrin: