Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there anyway to find just disk size from QlikView. We are not interested to know sub folders,QVW sizes etc.
We just need Disk size (currently filled)
Thanks,
Chiru.
Your code is missing out the create object line. Also, the : should not be there in the IF statement.
The macro code should look like this:
sub x
set fso = CreateObject("Scripting.FileSystemObject")
For Each LW In fso.Drives
if LW.DriveLetter = "C" then
msgbox(LW.DriveLetter & ": " & LW.AvailableSpace / 1000000 & " MB")
end if
next
end sub
Also, you don't presently have a way of firing the macro. You need to add a button and set an Action on it, of type External, Run Macro and set the Macro Name to x.
I've attached an updated copy.
Steve
Is there a simple way... I don't think so, sorry. However there are various ways to get the (free) disk space of a specific drive using various forms of coding.
Maybe something like this: https://www.experts-exchange.com/questions/27881276/Batch-command-to-output-the-Drive-Size-and-Free-...
- Marcus
Can we write macro to find out the disk space by any chance in QlikView ?
The following is adapted from here: mit VBA Laufwerksinformationen ermitteln and worked:
sub x
set fso = CreateObject("Scripting.FileSystemObject")
For Each LW In fso.Drives
msgbox(LW.DriveLetter & ": " & LW.AvailableSpace / 1000000 & " MB")
next
end sub
- Marcus
Thanks Marcus.Need your help with syntax.
Can you give syntax If I want to find C:\ disk space in windows machine.
Chiru
Try this:
For Each LW In fso.Drives
if LW.DriveLetter = "C:" then
msgbox(LW.DriveLetter & ": " & LW.AvailableSpace / 1000000 & " MB")
end if
next
- Marcus
Thanks Marcus and really appreciate your help.
Code is executing fine .But it is not giving me any out put.
Attaching sample QVW here.
Chiru !
Your code is missing out the create object line. Also, the : should not be there in the IF statement.
The macro code should look like this:
sub x
set fso = CreateObject("Scripting.FileSystemObject")
For Each LW In fso.Drives
if LW.DriveLetter = "C" then
msgbox(LW.DriveLetter & ": " & LW.AvailableSpace / 1000000 & " MB")
end if
next
end sub
Also, you don't presently have a way of firing the macro. You need to add a button and set an Action on it, of type External, Run Macro and set the Macro Name to x.
I've attached an updated copy.
Steve