Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Macro to check if exact path exists based on server name

Hello community,

I want to transfer my Excel macro (see below) to QlikView in order to get the following job done:

I retrieve five files from five servers.

Each file contains a list of paths to certain folders on that particular server. I want to check if those exact paths actually exist on that server and mark it green or red in QlikView.


Each file contains the following path column with records like so:




In an inline table I use the filename as a key and add the column serverpath.







So my goal would be to select one file in QlikView and then click a button which checks if those paths listed in the file actually exist on the corresponding server.

My working Excel-Macro looks like this:

Dim MyCheckDir As String

Dim iRow As Integer

iRow = 2

Do Until IsEmpty(Cells(iRow, 3))


    MyCheckDir = Range("SERVERPATH").Value & Mid(Cells(iRow, 3).Value, 12) & "\"

    If Dir(MyCheckDir, vbDirectory) <> "" Then

           Cells(iRow, 6).Value = "OK"


           Cells(iRow, 6).Value = "NO"

    End If

    iRow = iRow + 1


Hope you can show me a way to get this done with QlikView.

Thank you,


Tags (4)
2 Replies
Honored Contributor II

Re: Macro to check if exact path exists based on server name

I googled your question:

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FolderExists("C:\FSO") Then

Set objFolder = objFSO.GetFolder("C:\FSO")

Wscript.Echo "Folder binding complete."


Wscript.Echo "Folder does not exist?"

End If

Not applicable

Re: Macro to check if exact path exists based on server name

but how do I get the field values with the correct serverpath from QlikView in the FolderExists and GetFolder functions?

Community Browser