Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to edit a script to use %USERPROFILE% instead of using c:\users\computer name\ to help someone who moves around to different machines that has Qlikview licenses and has the their excel file loaded in the same dropbox location on each computer. So, instead having to change the load statement and create different files, I was trying to use the path to the %USERPROFILE%...
//[%USERPROFILE%\Dropbox\Apps\Attachments\Data.xls
You can't access the variable directly, but you can use the GetFolder() function to retrieve the same value.
LET vUserprofile = GetFolderPath('Profile');
LOAD ...
FROM [$(vUserprofile)\Dropbox\Apps\Attachments\Data.xls
-Rob
You can do something like this:
EXECUTE cmd.exe /c echo %USERPROFILE% > user.txt;
path:
LOAD @1 as userpath
FROM
user.txt
(txt, codepage is 1252, no labels, delimiter is '\t', msq);
let v = Peek('userpath',0,'path');
DROP Table path;
Check attachment.
Hope this helps.
You can't access the variable directly, but you can use the GetFolder() function to retrieve the same value.
LET vUserprofile = GetFolderPath('Profile');
LOAD ...
FROM [$(vUserprofile)\Dropbox\Apps\Attachments\Data.xls
-Rob