Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
DIR normally shows the local file content size, then the whole for the system below that, without the properties of the local folder and sub-directories contained within it.
just type du c:\ for example on the command prompt. if you want, use a for loop to grab results. simple as that.
set dirname=C:\squid\var\cachefor /f "tokens=1-2" %%A in ('du -q "%dirname%" ^| find "Size:"') do set foldersize=%%Bset foldersize=%foldersize:,=%
D:\Audio-DL>diruse /s "Amaral Discografia" Size (b) Files Directory 23503006 1 AMARAL DISCOGRAFIA 45934192 13 AMARAL DISCOGRAFIA\Amaral 216104622 46 AMARAL DISCOGRAFIA\split-IOtest 73095739 13 AMARAL DISCOGRAFIA\Una Peque帶 Parte del Mundo 358637559 73 SUB-TOTAL: AMARAL DISCOGRAFIA 358637559 73 TOTAL: AMARAL DISCOGRAFIAD:\Audio-DL>diruse /s "Amaral Discografia" | find "TOTAL:" 358637559 73 SUB-TOTAL: AMARAL DISCOGRAFIA 358637559 73 TOTAL: AMARAL DISCOGRAFIAD:\Audio-DL>diruse /s "Amaral Discografia" | find "TOTAL:" | find /V "SUB-TOTAL:" 358637559 73 TOTAL: AMARAL DISCOGRAFIA
D:\Audio-DL>du -v "Amaral Discografia"Du v1.31 - report directory disk usageCopyright (C) 2005-2006 Mark RussinovichSysinternals - www.sysinternals.com 44,857 D:\Audio-DL\amaral discografia\Amaral 211,039 D:\Audio-DL\amaral discografia\split-IOtest 71,382 D:\Audio-DL\amaral discografia\Una Peque帶 Parte del Mundo 350,231 D:\Audio-DL\amaral discografiaTotals:Files: 73Directories: 3Size: 358,637,559 bytesSize on disk: 358,637,559 bytes
D:\Audio-DL>gnuDU -b -c "Amaral Discografia"45934192 Amaral Discografia/Amaral216104622 Amaral Discografia/split-IOtest73095739 Amaral Discografia/Una Peque帶 Parte del Mundo358637559 Amaral Discografia358637559 totalD:\Audio-DL>gnuDU -b -c "Amaral Discografia" | find "total"358637559 total
The Sysinternals version is simpler to manipulate (I have both) but as you say the GNU version is less limited. Another thing to consider might be DIRUSE from the NT Resource Kithttp://support.microsoft.com/kb/927229Code: [Select]D:\Audio-DL>diruse /s "Amaral Discografia" Size (b) Files Directory 23503006 1 AMARAL DISCOGRAFIA 45934192 13 AMARAL DISCOGRAFIA\Amaral 216104622 46 AMARAL DISCOGRAFIA\split-IOtest 73095739 13 AMARAL DISCOGRAFIA\Una Peque帶 Parte del Mundo 358637559 73 SUB-TOTAL: AMARAL DISCOGRAFIA 358637559 73 TOTAL: AMARAL DISCOGRAFIAD:\Audio-DL>diruse /s "Amaral Discografia" | find "TOTAL:" 358637559 73 SUB-TOTAL: AMARAL DISCOGRAFIA 358637559 73 TOTAL: AMARAL DISCOGRAFIAD:\Audio-DL>diruse /s "Amaral Discografia" | find "TOTAL:" | find /V "SUB-TOTAL:" 358637559 73 TOTAL: AMARAL DISCOGRAFIACode: [Select]D:\Audio-DL>du -v "Amaral Discografia"Du v1.31 - report directory disk usageCopyright (C) 2005-2006 Mark RussinovichSysinternals - www.sysinternals.com 44,857 D:\Audio-DL\amaral discografia\Amaral 211,039 D:\Audio-DL\amaral discografia\split-IOtest 71,382 D:\Audio-DL\amaral discografia\Una Peque帶 Parte del Mundo 350,231 D:\Audio-DL\amaral discografiaTotals:Files: 73Directories: 3Size: 358,637,559 bytesSize on disk: 358,637,559 bytesCode: [Select]D:\Audio-DL>gnuDU -b -c "Amaral Discografia"45934192 Amaral Discografia/Amaral216104622 Amaral Discografia/split-IOtest73095739 Amaral Discografia/Una Peque帶 Parte del Mundo358637559 Amaral Discografia358637559 totalD:\Audio-DL>gnuDU -b -c "Amaral Discografia" | find "total"358637559 total
Executed from a folder, Dir shows the names of any subfolders, and the names, dates and sizes of any filespresent in the folder, and the total size in bytes of the files in the folderonly.S:\Test\Batch>dir Volume in drive S is USBHD Volume Serial Number is 2C51-AA7F Directory of S:\Test\Batch26/09/2009 20:46 <DIR> .26/09/2009 20:46 <DIR> ..28/10/2009 21:02 <DIR> After 07-09-0907/09/2009 17:13 <DIR> Older15/05/2009 06:52 <DIR> EditVS15/05/2009 06:56 <DIR> sst2627/05/2009 17:56 116 Finder.bat26/09/2009 20:46 44 getp2.bat18/09/2009 16:51 217 isfolder.vbs15/09/2009 17:48 46 ddf.vbs09/05/2009 07:56 78 rarhelp.bat25/05/2009 18:58 37 dequote.vbs23/06/2009 19:34 245 Edit3 7 File(s) 783 bytes <----------------------------------------- 6 Dir(s) 146,969,190,400 bytes freeAre you saying you want to know the amount of data in each subfolder?
He's playing a game called IRL. Great graphics, *censored* gameplay.
that part only shows the size in the current directory. how about the rest of the directories? you have to individually go into each directory under s:\test\batch and get those sizes and add them up. Extra coding, extra brain cells killed.