Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
yelin_nyu
Creator
Creator

use/set variables in execute statement

I have a execute statement to extract from zip file. but the file name will have a different date each week.

the file location has many batches of data, I need to make sure im picking up the right week's data.

I set the variables in qlikview, tried to use it in the file name in the execute statement, but it's not working.

let vFileName='Hey_';
let vBatch=date(weekstart(today()),'YYYYMMDD');
let vFileExt='.zip';
let vFile=vFileName&vBatch&vFileExt;

execute "\\MyFilePath\7za.exe" e \\\MyFilePath\FTP\$(vFile) -y -o\\MyFilePath\Input\*;

1 Solution

Accepted Solutions
rubenmarin

Hi yelin, I think it should work, maybe is the triple-dash in \\\MyFilePath\FTP or it need to add a space between -o and the path in -o\\MyFilePath\Input\*;

View solution in original post

2 Replies
rubenmarin

Hi yelin, I think it should work, maybe is the triple-dash in \\\MyFilePath\FTP or it need to add a space between -o and the path in -o\\MyFilePath\Input\*;

yelin_nyu
Creator
Creator
Author

it's the triple \, im so sorry to waste everyone's time. however you cannot put a space btw -o and the file path, it would not  work. part of the syntax I believe. took me a couple trial and error to figure that out.