Disk Space Info

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

Disk Space Info

Post by *AnthonyCian »

I noticed when I click on the spacebar while on a folder, it will give me the disk space usage for that folder. If that folder has subfolders it will include that disk space as well. Anyway to tell TC not to include subfolder disk space?

I'm using the plugin dirsize.wlx and it's ok, but like to know if TC will have something direct?

Thanks,

Anthony
Last edited by AnthonyCian on 2006-07-09, 20:33 UTC, edited 1 time in total.

User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 849
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

AnthonyCian
You can't do that: if you calculate the size via space, it will always be with subfolders. You can try asking Lefteous to add some functionality to his DirSizeCalc plugin.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..

User avatar
van Dusen
Power Member
Power Member
Posts: 683
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

2AnthonyCian

You could try this VB-Script for Lev Freidin's Script Content Plugin 0.1.0.1:

Code: Select all

'*** dirsize_nonrecursive, van Dusen, 11.07.2006
'Script for Script Content Plugin
'(c)Lev Freidin, 2005
'http://www.totalcmd.net/plugring/script_wdx.html
'http://wincmd.ru/plugring/script_wdx.html

Dim fso, folder, filecollection, file
Set fso = CreateObject("Scripting.FileSystemObject")
dirsize = 0
content = ""

If fso.FolderExists(filename) Then

   Set folder = fso.GetFolder(filename)
   Set filecollection = folder.Files
   For Each file in filecollection
      dirsize = dirsize + file.size
   Next
   
   content = FormatNumber(dirsize, 0, 0, 0, -2)
   
   Set folder = Nothing
   Set filecollection = Nothing
   
End If

Set fso = Nothing
Save this script as "dirsize_nonrecursive.vbs" to the script_wdx.wdx installation folder. Your script.ini should look like this:

Code: Select all

[Script]
Section=DirSize_NonRecursive

[Defaults]
LongName=0
ParseDirs=0

[DirSize_NonRecursive]
LongName=0
ParseDirs=1
Script=DirSize_NonRecursive.vbs
Add a new column to a new or an existing custom column view with content

Code: Select all

[=script.Result]
Switch to that custom column view... done :)

User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

Post by *AnthonyCian »

Thank You!
AC

User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

Just for your information.
You don't need to include the [Defaults] section to ini file it's just for the informaton about ini defaults. This section is neither read nor set by plugin. So there is no use of changing it content too (it can miss you).

Post Reply