Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

Reading line by line to get the size of each file with full path

Hi,

I am trying to read the size of a file line by line from the below text file(Please see the attachment). As the below format can't be read as it is could you please help me to read through QV. Data should be loaded something like below after loaded into QV. Please help!

123,904 E:\QlikView\Weekly Data - Copy.qvw

143,872 E:\QlikView\Weekly Data.qvw

.

.

114,432 E:\QlikView\Data\DIR Space.qvw

1,551     E:\QlikView\Data\EMPLOYEE.2013_34.qvd

.

.

16 Replies
Not applicable

I modified the script and find the attached file

Not applicable

Anything working with all the answers ?

Fabrice

qlikviewforum
Creator II
Creator II
Author

Hi Dathu,

Thanks, I will try and let you know.

Hi Fabrice

Got stuck with few things. Will keep you updated on this.

qlikviewforum
Creator II
Creator II
Author

Hi Dathu,

It is working with the same file which I have provided. But the same is not working when I am using with my data . As I am not able to understand the logic of your code. I couldn't implement the same in mine . Let me understand it and will try to do something.

Thanks

qlikviewforum
Creator II
Creator II
Author

Failed to implement with my data. Still couldn't get the desired out put. Please see if you can do any changes which was work anywhere.

Any suggestions on how to achieve with my data. May be the fields which you are taking is per the sample which I have given.(i.e @15:36,@37:80 is per the sample which I have given. I don't know what should I consider with my data ). Please help me...

DavidFoster1
Specialist
Specialist

I have had a quick play.

I think the following approach will work:

1) Use this script in a batch file.

forfiles /s /c "cmd /c if @isdir==FALSE echo @path @fsize" > filedata.txt

2) read the text file into qlikview.

qlikviewforum
Creator II
Creator II
Author

Thank You. I am very bad in batch programming. So please tell me where I should be passing the DIR which I want to scan it here.

For example, If I want to scan C:\Program Files\Common Files where I should be passing that in the batch file. Please help!

If this works that would be great. But if this works as per it was expected then my question will be how pass the multiple directories at the same time as we would like to scan it at a time and have the output saved in a single file.

Glad that you have helped me on this.