Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Do you know how to use QV script to delete the QVD file?
Thanks.
First, consider that a STORE statement will overwrite the existing QVD file.
To specifcally delete the qvd file, try an EXECUTE script statement.
EXECUTE CMD.EXE /C del "myqvd.qvd";
-Rob
I guess, you have to use Macro for it . . .
First, consider that a STORE statement will overwrite the existing QVD file.
To specifcally delete the qvd file, try an EXECUTE script statement.
EXECUTE CMD.EXE /C del "myqvd.qvd";
-Rob
Thank you Rob!
It is throwing secutiry alert as we didn't set the EXECUTE flag for script for not been set. Could you please help me out to set the same.
You need to allow Script (Allow Database Write and Execute Statements) in User Preferences/Security tab.
Open the QVW file -> Settings -> User Preferencs -> Security -> Check Script (Allow Database Write and Execute Statements) . Click OK and apply. Save the Document. then it won't prompt security message.
Stefan Walther has a great discussion about it here ; he reviews three techniques.
- Delete the files with a macro called from the load script
- Delete the files by executing a batch statement
- Use a pure load-script statement without giving your script system-access and empty the QVD-files within your load-statement
Notice other answers here have already addressed
Set
objFSO = CreateObject(
"Scripting.FileSystemObject"
) )
But Stefan prefers the 3rd technique.
Remember as Sean and Prasanna say, you may need to change security settings:
I updated my security settings and wrote my execute statement. It still throws this message and makes me click Override. The script finishes but doesn't delete the file. What am I missing?
EXECUTE CMD.EXE /c del c:\QlikView\Scorecard\Premium Fact\PremFact.qvd
May be double quotes missed for your path
DUR! Thanks!