Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
raz-datamind
Partner - Contributor
Partner - Contributor

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

1 Solution

Accepted Solutions
masha-ecraft
Partner - Creator
Partner - Creator

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

View solution in original post

2 Replies
masha-ecraft
Partner - Creator
Partner - Creator

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
Partner - Contributor
Partner - Contributor
Author

Thanks,

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