Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

Sizes of all the files inside the sub folders of the directories

Hi All,

We are making use of DIRUSE.exe in the following way to get the space details of the directories. But the problem is we are unable to file the filesize of the files in the last folder. It just gives the space details of all the subfolders. Could you please help me out to find out the space details of the files inside the subfolders.

E:\QlikView\DIRUSE /s/m E:\QlikView\Data > E:\QlikView\Data\Size.txt

Size.txt contains sizes of all the sub folders inside E:\QlikView\Data. Header of the output is something like below.

Size(mb) Files Directory


Please help me out on this...

18 Replies
jonasheisterkam
Partner - Creator III
Partner - Creator III

If you need it in QV, you can combine the recursive for each example to entering folders and getting each file and then use the filesize function.

if you need it as a batch script, please give some informations like filesys, operating sys etc.

swuehl
MVP
MVP

Seems to work for me, here at my place.

If you are having problems with Windows resource kit executables like diruse.exe, I suggest you post your issue to a Microsoft Windows forum. Your request seems not to be very QV specific.

qlikviewforum
Creator II
Creator II
Author

Hi Swuehl,

Did you tried using the same DIRUSE.exe by passing the parameters? If so please let me know what parameters you are using? In my case we are passing /s/m. Let me know if anything wrong here.

I know this is issue not specific to QV. But thought of giving it a try by posting it here so that at lease someone who has worked on similar thing can help me out.

qlikviewforum
Creator II
Creator II
Author

I need it as a batch script or VBScript. We are using Windows Server 2008. Let me know if you need any more details.

swuehl
MVP
MVP

Yes, I used

diruse.exe /s/m "c:\intel" > c:\Temp\diruse.txt

and I got

Size (mb)  Files  Directory

         3.03      2  C:\INTEL

         0.00      0  C:\INTEL\ExtremeGraphics

         0.00      0  C:\INTEL\ExtremeGraphics\CUI

         0.00      1  C:\INTEL\ExtremeGraphics\CUI\Resource

         2.57      8  C:\INTEL\Logs

         5.60     11  SUB-TOTAL: C:\INTEL

         5.60     11  TOTAL: C:\INTEL

It might be a executable / OS version issue, but again, I would suggest that you post your request to a Windows forum, just because I believe you'll find an answer there more easily.

As Jonas said, there are samples here in the forum on how to list the file sizes using the QV script, but if you want to use Windows scripting, there are better sources in the WWW to look for.

qlikviewforum
Creator II
Creator II
Author

I could see size of the sub folders in above output. I don't see size of the files there. Please correct me if I am wrong. That was the issue I am facing it.

Also please post me the Microsoft Windows URL so that I can post this issue there. Please let me know in case of any issues.

swuehl
MVP
MVP

That's probably because you are using a tool that's coping with directory usage.

You can try with the DIR command

dir /S /A:-D /O:S c:\intel

There is not a single URL for Windows related questions, there are actually myriads of URLs.

You can start with Technet forums social.technet.microsoft.com/Forums/en-US/home or stackoverflow.com

I would suggest that you google for an existing answer, since this request should already been answered.

edit: removed the external links to get this post out of moderation (after 3 days)

qlikviewforum
Creator II
Creator II
Author

Hi Swuehl,

Any updates on the questions which I have asked for?

qlikviewforum
Creator II
Creator II
Author

Any updates from anyone on this? Please help...