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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to delete QVD file from folder

Dear team

I am trying to delete qvd file with below commands

Let vMaxDEL = Date(Num(Peek('MaxCOB', 0, 'MinMaxCob')), 'DDMMYYYY');     => 30092015

LET vDelMaxCOB = '..\QVDs\COB_$(vMaxDEL).qvd';                                           => ..\QVDs\COB_30092015.qvd

EXECUTE CMD.EXE /C del $(vDelMaxCOB);   This command does not delete above file with relative path

(I already checked Script..box under user preference and Can execute under Setting@script)

Please advise

Thanks

1 Reply
swuehl
MVP
MVP

Your relative path will be executed by the CMD.EXE, so it's unlikely that the path will be found from the working directory of CMD.EXE.

Try converting your relative path to an absolute path by using special system variable QvWorkPath:

LET vDelMaxCOB = '$(QvWorkPath)\...\QVDs\COB_$(vMaxDEL).qvd';