Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create folder if not available

Hello qlikers 🙂 ,

I want to create a folder in qlik sense script when the folder isn't created.

 

SET varPath = ' 'lib://Qlik/Transfer/Test/Backup';
LET varFolder = DocumentTitel();

IF ((varPath + varFolder) exist)
// do something
ELSE
create varPath + varFolder

 

How can I do that? Thank you in advance! 🙂 Looking forward to reading some answers.  

Labels (3)
1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

in former times (especially with QlikView 11.2 and lower) you could'nt write a file to a folder that doesn't exists.

Since QV 12, and so I think in actual versions of Qlik Sense it is also, a folder is created if not exists.

 

store table into LIB://qvd/VBRP/2020/VBRP_2020.qvd (qvd);

regards

View solution in original post

3 Replies
anushree1
Specialist II
Specialist II

You can use the below statement to check if the file is present :

let vfilechk= if(FileSize('lib://Folder_Conn/Data and Graph.xlsx')>0,1,0);

Anonymous
Not applicable
Author

Thank you for your answer.  I check if the folder exist with

if FileTime($(vSavePathBackup)$(saveName))

 But how can I create this folder, when it doesn't exist?

Thank you agian! 🙂

martinpohl
Partner - Master
Partner - Master

in former times (especially with QlikView 11.2 and lower) you could'nt write a file to a folder that doesn't exists.

Since QV 12, and so I think in actual versions of Qlik Sense it is also, a folder is created if not exists.

 

store table into LIB://qvd/VBRP/2020/VBRP_2020.qvd (qvd);

regards