How to? Can @DU function in 4Utils64 plugin somehow cater for dirs with spaces?

Feb 14, 2020
4
0
Earth. Usually.
Hi all.

I'm trying to write a script to display the disk space used individually by all the games I have installed. I want to see the allocated space so that I know accurately how much space will be recovered if I uninstall a particular game.

Unfortunately, the @FILESIZE function is bugged when you ask it to return allocated space, so I'm looking for alternatives.

After researching plugins, I came across vefatica's 4UTILS64 plugin and installed it. I'm trying to use the @DU function to return allocated space and it seems to work fine, but only if the directory name has no spaces in it. For directories with spaces, the function seems to have a problem and always returns "-1".

Examples:
Code:
echo %@du[f12013,ra]
9196498944   <---- This is correct. For the game F1 2013, DIR /s also reports 9,196,498,944 bytes allocated.

echo %@du[path of exile,ra]
-1

echo %@du["path of exile",ra]
-1           <---- Incorrect. For Path of Exile, DIR /s reports 31,835,172,864 bytes allocated.

Is there some way I can adjust the syntax with @DU to allow it to process directories containing spaces? I think I've tried just about every possible combination:
Code:
echo %@du[path of exile,ra]
echo %@du["path of exile",ra]
echo %@du[path of exile\*,ra]
echo %@du["path of exile\*",ra]

Ha! Believe it or not, while writing this post I've been double-checking the syntax of the above code statements by running them again in a command-line window. I think I've found a workaround. If I type....
Code:
cd "path of exile"
echo %@du[.,ra]

I get the right result. So it looks like I can get my script working with a little editing. But I would still like to know if there's a way to use the directory name directly with @DU, as it seems a little inconsistent for it to work with some directories but not others.

Thanks for any help offered.
 
Similar threads
Thread starter Title Forum Replies Date
dcantor Function @uquotes duplicated or error in listing Plugins 3
fpefpe unresoloved api function -- Command Plugins 3
dcantor @DATEDIFF UDF function using ISO8601 plugin functions Plugins 0
R Looking for mouse_up / mouse_down function Plugins 1
jwiede 4console64 & 4utils64 errors in V23... Plugins 8
jfalch Problem with 4utils64 in v21 Plugins 5
Joe Caverly 64-bit Plugin development using PureBasic Plugins 11
R New Plugin Plugins 0
Alpengreis elevated plugin questions Plugins 3
fpefpe utf-8 support in sdk/plugin api Plugins 4
vefatica Plugin access to arrays? Plugins 4
vefatica How big is a plugin's parameter buffer? Plugins 5
C @knownpath plugin Plugins 0
Charles Dye Updated OSD plugin Plugins 0
Joe Caverly C# plugin framework for JPSoft's TCC Plugins 0
dcantor Help for newest version of TEXTUTILS plugin Plugins 10
dcantor UISTUFF plugin missing help topic Plugins 12
M How to? Use SafeChars plugin... Plugins 2
dcantor Error in SAFECHARS plugin v 1.9.0 Plugins 2
dcantor Request for documentation for ISO8601 plugin Plugins 4
vefatica Possible with a plugin? Plugins 6
dcantor Inconsistency between textutils plugin and wrap utility Plugins 2
M (Stupid?) Problem with 64-bit 4Utils plugin... Plugins 3
H Latest ISO8601 plugin? Plugins 1
Charles Dye New plugin: QKeys Plugins 34
S Plugin to quickly locate all files hard linked together Plugins 5
S Documentation Plugin everything.dll Plugins 5
newbie How to? Multi-plugin installation errors, Re: FedUtils8 Plugins 7
vefatica Plugin -> thread -> Command() -> Ctrl-C? Plugins 20
Charles Dye A weirdoid plugin question Plugins 6
M SafeChars plugin misbehaving... Plugins 3
M A weird error re a plugin... Plugins 0
vefatica Plugin dilemma Plugins 2
fpefpe Documentation Plugin API/SDK Plugins 3
C Looking for Vince's old 4UTILS plugin for TCMD v8 Plugins 1
S DESKTOP plugin - anyone ? Plugins 0
C How to? a plugin to sort Outlook Express "rules" Plugins 0
M ISO Plugin: Yes, it's wonderful, but it could be yet more wonderful... Plugins 7
M The ISO plugin is wonderful, but it lacks a little something... Plugins 22
Charles Dye Beta plugin: HidePasswords Plugins 3
M ISO8601 Plugin not "reporting" errors to TCC... Plugins 4
Frank 4console plugin Plugins 4
S WAD ISO8601 Plugin Plugins 15
Joe Caverly Plugin and 64-bit TCC Plugins 3
C Problem with FixNames plugin Plugins 9
dcantor Suggestion and request for DBF plugin Plugins 6
dcantor Suggestion for SafeChars plugin Plugins 7
M Charles, I just installed the "new" SafeChars plugin, ... Plugins 5
M A problem with the SafeChars Plugin... Plugins 30
S WHICHWIN (sysutils plugin) Plugins 13

Similar threads