Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

raz-datamind
Not applicable

folder name from within script

Hello,

Can i extract folder name from within the model script?

I have a qvw file in a folder, and i want to use the folder name in the script of that file. can it be done?

Thanks,

Raz

Tags (1)
1 Solution

Accepted Solutions
masha-ecraft
Not applicable

Re: folder name from within script

Hi,

There is DocumentPath() function that you can use. Its result contains not just a directory but the file name as well, but you can extract just the directory using string functions.

If you need the qvw folder to figure the folders for some other files, you can also use the relative path specification like '\subdirectory' for a sub-folder within a current folder or '..\subdirectory' for folder located on the same level as the current (qvw) folder.

/Masha

2 Replies
masha-ecraft
Not applicable

Re: folder name from within script

Hi,

There is DocumentPath() function that you can use. Its result contains not just a directory but the file name as well, but you can extract just the directory using string functions.

If you need the qvw folder to figure the folders for some other files, you can also use the relative path specification like '\subdirectory' for a sub-folder within a current folder or '..\subdirectory' for folder located on the same level as the current (qvw) folder.

/Masha

raz-datamind
Not applicable

Re: folder name from within script

Thanks,

I thought it only works on files i load in the script but i see that it also works on the qvw itself.