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: 
chrisbrain
Partner - Specialist II
Partner - Specialist II

Creating directories in QlikView Script

Is it possible to create directories in QlikView script?

I would like to store daily QVD dumps of data in a subfolder based on the year month and say, e.g.

2011\7\22\MyQvd.qvd

But I need to generate these folders on a daily basis.

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
1 Solution

Accepted Solutions
swuehl
MVP
MVP

mkdir is a command line command.

try

Execute cmd.exe /C mkdir c:\test

Stefan

View solution in original post

10 Replies
Not applicable

i think it will work with a macro look here for synatx http://www.wisesoft.co.uk/scripts/vbscript_create_folder.aspx

chrisbrain
Partner - Specialist II
Partner - Specialist II
Author

Thanks - I did think about macros but preferred to avoid it if possible - doesn't sound like it is though!

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
danielrozental
Master II
Master II

Chris, if you use the execute command you can ran any DOS command like mkdir.

eg

execute mkdir directory

chrisbrain
Partner - Specialist II
Partner - Specialist II
Author

Ah interesting!

OK so I am trying this:

execute mkdir c:\test;

But keep getting:

Script line error:

execute mkdir c:\test

The command works fine via a command prompt. Any ideas what I am missing?

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
swuehl
MVP
MVP

mkdir is a command line command.

try

Execute cmd.exe /C mkdir c:\test

Stefan

martin59
Specialist II
Specialist II

Hi,

You have to allow the macro override security in the document properties (security tab)

capture.png

After that, you can also try something like that :

EXECUTE mspaint;

Hope that helps you

Martin

danielrozental
Master II
Master II

Sorry, right syntax should be

execute cmd.exe /c mkdir c:\test;

chrisbrain
Partner - Specialist II
Partner - Specialist II
Author

Thanks all!

Execute cmd.exe /C mkdir c:\test

Works.

Martin - I think the check box you show in your screen shot is only for code in the macro module (not load script) - I think the correct check box is the 'Can Execute Externam Programs' in the Settings tab of the load script.

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
Not applicable

Here is a syntax to create a new folder in the same location of the QVW :

EXECUTE cmd.exe /C mkdir QVD;

Thanks.