can I show disk space in a customized column?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
fallmq
Junior Member
Junior Member
Posts: 19
Joined: 2012-06-28, 16:47 UTC

can I show disk space in a customized column?

Post by *fallmq »

when enter the "\\Computer\" path, I can see a list of all volumes, then when I press "ctrl + F2", I can see some useful informations. for example, it will show freed space for disk volumes as this format "<100GB / 200GB>".

this function is useful to me, I wonder whether it is possible to show this in a customized column, I try to use [=tc.size] in my column, but it will only show the string " <DIR> ".
User avatar
silencer
Senior Member
Senior Member
Posts: 208
Joined: 2003-05-13, 13:18 UTC
Location: The Netherlands

Post by *silencer »

Are you looking for occupied space by subdirectories?

You can press ALT+SHIFT+ENTER to show occupied space by standard TC.

If you are looking for a more "permanent" showing dir-size, you can use DirSizeCalc
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

silencer, he wants to get custom column with drive size...

I doubt it is possible, virtual folders are very limited.
User avatar
silencer
Senior Member
Senior Member
Posts: 208
Joined: 2003-05-13, 13:18 UTC
Location: The Netherlands

Post by *silencer »

Why do you want to see the available drive space in the collumn size then? If you've enable "show drive combobox" you will see the free and occupied space of the drive above the file window.

Like in the this http://www.ghisler.com/screenshots/en/01.html
fallmq
Junior Member
Junior Member
Posts: 19
Joined: 2012-06-28, 16:47 UTC

Post by *fallmq »

I am using DirSizeCalc now, but it can only show the size of a folder, it can't show the free space for a driver.
my requirement is show a LIST of all volumes, because I have 5 hard disks, and I split them into 9 partitions, so sometimes I need to balance the free space of different partitions(one partition is almost full, another partition is still empty, then move data from the full partition to the empty partition), so just know the free space of "current" volume is not enough for me.

my question is totalcmd itself can easily show the free space information by press "ctrl + F2", I think it means TC is already be able to get this information, the problem is just how to import the information into customized column.

BTW: ALT+SHIFT+ENTER don't take effect for driver, it only works for folders.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2fallmq
There is a content plugin called 'Volume' which displays all kind of volume information.

But no content plugin works in a virtual folder like \\Computer\. This is something TC has to support but so far my request hasn't been implemented.
fallmq
Junior Member
Junior Member
Posts: 19
Joined: 2012-06-28, 16:47 UTC

Post by *fallmq »

thanks a lot, so the root cause is \\Computer\ is a virtual folder.
I have tried several content plugins, I found most of them don't support virtual folder. :(
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

fallmq wrote:I have tried several content plugins, I found most of them don't support virtual folder. :(
That's incorrect. It is TC who doesn't support content plugins in virtual folders, not plugins. TC doesn't call plugins in virtual folders at all. Only some internal TC fields work there.

But I can suggest you an idea.

First of all, install mentioned Volume plugin.
Then create some folder which will show drive list. E.g. C:\Computer. Enter it and execute command cmd to open command line, and execute mklink /J C C:\ - it will add a junction point to C:\ folder with name C. Repeat for every volume, use any names and full paths to volumes.
Then you may add your custom columns from Volume plugin, and it will show stats for all volumes through junctions. :)
Now you get volume list, and you can enter them like folders and see contents.
Final step! Open junction properties, Security tab, add user Everyone and forbid reading folder contents. TC will now simply jump to C:\ instead of entering C folder!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Lefteous
Unfortunately many virtual folders do not allow access to the files - not even via an IStream or IStorage interface, e.g. MTP devices like most modern phones and cameras. Therefore it wouldn't help much to tell the plugin the IDList of the virtual file.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Unfortunately many virtual folders do not allow access to the files - not even via an IStream or IStorage interface, e.g. MTP devices like most modern phones and cameras. Therefore it wouldn't help much to tell the plugin the IDList of the virtual file.
Difficult to say if these are too many to make it useless. I think just the standard virtual folders desktop, computer and recycle bin would make it useful enough.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Lefteous,
Problem is that IDList is useless for plugin that expects file path. It will need to rewrite all existing plugins to make them working with it.

ghisler,
Have you tried function SHGetPathFromIDList? It seems that it can convert IDList to file path. Documentation says that it is supported since WinXP but I found it in shell32.dll from Win2K SP5 (5.00.2920.0000). If it will do what you need, you can use it when it is available.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2MVV
Problem is that IDList is useless for plugin that expects file path. It will need to rewrite all existing plugins to make them working with it.
I didn't suggest a replacement of the existing function ContentGetValue.

Instead I suggested an additional function that transfers an IShellFolder object and a relative item id list object. Maybe it's better to have two functions. One transfers a new IShellFolder object (called once per folder change and another one transfers the item id list object.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Anyway it is necessary to modify plugins to add support for this object type.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2MVV
Anyway it is necessary to modify plugins to add support for this object type.
I know what you mean. When there is actually a logical path behind an object TC could not just resolve the path for itself but also call ContentGetValue. I have no problem with that and it's the best solution if the plugin needs a logical path and TC has already extracted it from the item id list.

But take the recycle bin as example. It's way easier and faster to get the object properties by item id list than by physical filename.
This is also a performance topic. In order to get some information frm files I need the item id list. So far I have to take the filename and extract the item id list. In this case I would appreciate if TC could hand it over to the plugin instead of calling the standard ContentGetValue.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You're right, sometimes it is better to have virtual item object. I think ContentGetValue may be used for this too, but with special indication that it is called with IDList and not filename (special prefix and IDList?). ContentGetSupportedFieldFlags may export additional flag that tells that field accepts IDList instead of filename.
Post Reply