How to see free disk space on all the drives in the system?

English support forum

Moderators: Hacker, petermad, Stefan2, white

pakabra
Junior Member
Junior Member
Posts: 7
Joined: 2022-11-03, 09:30 UTC

How to see free disk space on all the drives in the system?

Post by *pakabra »

I'm not using that panel above file panel which shows drives to save vertical space (I love minimalism), is there a way to see how much free space left on the current drive?
Since I'm migrating from FAR, I'm missing it in the alt-f1/f2 menus, and there was ctrl-l which showed all the stats for current drive (size, free space, and many more).
Is this dedicated horizontal panel with drives the only way to see how much space left do I have?
pakabra
Junior Member
Junior Member
Posts: 7
Joined: 2022-11-03, 09:30 UTC

Re: How to see free disk space on all the drives in the system?

Post by *pakabra »

Stefan2 wrote: 2022-12-16, 10:57 UTC Just press Win+E on you keyboard. 
It opens windows explorer and I have to search for "my computer" there to actually see the information I'm looking for. Obviously it's not a solution. Right now I'm starting up FAR and press alt-f1 to see what's going on on my drives, it's faster than win-e.
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: How to see free disk space on all the drives in the system?

Post by *white »

Select any file/folder other than ".." and press Ctrl+L and the free space of the current drive is mentioned.
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: How to see free disk space on all the drives in the system?

Post by *Fla$her »

2pakabra
Try this FreeSpace.vbs:

Code: Select all

'—————————————————————————— VBS ——————————————————————————
' Show free space on the current drive of the active panel
' Parameter: %B+
'—————————————————————————————————————————————————————————
D = WSH.Arguments(0): If Mid(D, 2) = ":" Then _
S = CreateObject("Scripting.FileSystemObject").GetDrive(D).FreeSpace:_
For i = Len(S) to 1 Step -3: FS = Right(Left(S, i), 3) & " " & FS: Next:_
MsgBox RTrim(FS), 262208, " Free space on drive " & D
Overquoting is evil! 👎
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: How to see free disk space on all the drives in the system?

Post by *Stefan2 »

pakabra wrote: 2022-12-16, 11:12 UTC
Stefan2 wrote: 2022-12-16, 10:57 UTC Just press Win+E on you keyboard. 
It opens windows explorer and I have to search for "my computer" there to actually see the information I'm looking for. Obviously it's not a solution. Right now I'm starting up FAR and press alt-f1 to see what's going on on my drives, it's faster than win-e.
OK, I see.

For me Win+E open WinExplorer --- with the MyComputer (This PC) overview --- and I see all drives with max and free space.





 
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: How to see free disk space on all the drives in the system?

Post by *Fla$her »

Another option based on Autorun.wdx. Required lines for autorun.cfg:

Code: Select all

LoadLibrary Plugins\Autorun_Tweaks.dll
LoadLibrary Plugins\Autorun_Runtime.dll

# Show free space on drive by Win+Alt+Space:
SetHotkeyAction /H:SPACE /K:A /K:W ShowFreeSpaceOnCurrentDrive

Func ShowFreeSpaceOnCurrentDrive
   A = RequestInfo(1000)
   D = StrLeft(WinGetText(RequestInfo(8 + A)), 2)
   If StrMid(D, 2) = ':' Then MsgBox %'D & "  " & WinGetText(RequestInfo(10 + A))' ' Total Commander'
EndFunc
Last edited by Fla$her on 2022-12-17, 16:06 UTC, edited 3 times in total.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to see free disk space on all the drives in the system?

Post by *Horst.Epp »

The simple way is to roll down the left most breadcrumb arrow in the header above any side
and click This PC.
It will be shown as \\This PC\*.*

This gives you a list of all drives with their free space and its capacity.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: How to see free disk space on all the drives in the system?

Post by *Fla$her »

2Horst.Epp
I would suggest cm_OpenDrives + Ctrl+F2, but TC shows only labels on removable drives.

Another option is to bind the hotkey to 2906 (cm_VisDriveCombo) to show/hide the panel for a while.
Overquoting is evil! 👎
pakabra
Junior Member
Junior Member
Posts: 7
Joined: 2022-11-03, 09:30 UTC

Re: How to see free disk space on all the drives in the system?

Post by *pakabra »

Thank you guys for all the options! I have no idea what to do with the code, so I went with solution of assigning a hotkey to DriveCombo panel which Fla$her suggested. Works fine for me.
So I suppose there is no option to get a more complete overview of all the drives like it was possible in FAR in change drive dialog box? I probably don't need it, just an old habit of being able to easily asses the whole picture of what's happening on my drives in terms of free space.
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: How to see free disk space on all the drives in the system?

Post by *Fla$her »

2pakabra
I was responding to your question first of all:
pakabra wrote: 2022-12-16, 10:37 UTCis there a way to see how much free space left on the current drive?
Here is FreeSpaceOnDrives.vbs for all drives except optical:

Code: Select all

'————————————— VBS —————————————
' Show available space on drives
'———————————————————————————————
Option Explicit: Dim D, S, i, FS, List
For Each D in CreateObject("Scripting.FileSystemObject").Drives
   If D.DriveType < 4 Then
   If D.IsReady Then
      S = D.AvailableSpace
      For i = Len(S) to 1 Step -3: FS = Right(Left(S, i), 3) & " " & FS: Next
      List = List & vbLf & D & vbTab & RTrim(FS): FS = Empty
   End If
   End If
Next
MsgBox Mid(List, 2), 262208, " Available space on drives"
pakabra wrote: 2022-12-16, 14:59 UTCI have no idea what to do with the code
1 code: save to TC subfolder (Scripts, for example), create em_ custom command with a path to it (%COMMANDER_PATH%\Scripts\FreeSpace.vbs), enter the specified parameter in the second field, assign a hotkey to the command.
2 code: after installing the plugin, create/open autorun.cfg in the plugin folder, enter the code and save it. After restarting TC, press Alt+Win+Space.
3 code: Just like with the first code, but without the parameter. It can also be tested by launching on Enter.
Last edited by Fla$her on 2022-12-18, 12:15 UTC, edited 4 times in total.
Overquoting is evil! 👎
pakabra
Junior Member
Junior Member
Posts: 7
Joined: 2022-11-03, 09:30 UTC

Re: How to see free disk space on all the drives in the system?

Post by *pakabra »

Fla$her wrote: 2022-12-16, 17:32 UTC
TC community is sick! Thank you very much! I'm sorry if it sounded like a complain, it wasn't!

Moderator message from: white » 2022-12-18, 09:58 UTC

Removed overquoting as requested by a forum member.

The entire previous post was quoted which was not necessary and the quoted script contained an error that was corrected later.
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: How to see free disk space on all the drives in the system?

Post by *Fla$her »

2pakabra
Remove the quote, it's not need it. I removed the last line from the code, it happened by accident.
Report on the results of codes tests, please. :)
Overquoting is evil! 👎
NotNull
Senior Member
Senior Member
Posts: 298
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: How to see free disk space on all the drives in the system?

Post by *NotNull »

Alternative:

Code: Select all

TOTALCMD#BAR#DATA
cm_FocusTrg, cm_OpenNewTab,cm_OpenDrives

wcmicons.dll,83
List drivesizes


-1
This opens a list of all drives in the target pane and makes that the active one (ready to select the folder where you wannt to copy to, for example)
Per drive will the total size and free size be shown.
(You likely want to select a better icon though :))
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to see free disk space on all the drives in the system?

Post by *petermad »

I would suggest cm_OpenDrives + Ctrl+F2, but TC shows only labels on removable drives.
Also only show labels for mapped network shares.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply