Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
ssriramin19
New Contributor II

execute cmd delete from script

Hello Everyone, 

The excel file needs to be deleted from the share path , so I am writing the execute command. But file is not getting deleted .

This is the execute command 

EXECUTE cmd.exe /C Del "\\SESKWQVPPD01\QlikView\SourceDocs\Otif\PreProduction\1_Source_Data\RCA\$(vFile).xls";

 

Can anyone please suggest me what is wrong & what is the syntax for execute command to delete the excel file from the script 

 

Thanks - Sriram

 

6 Replies
ssriramin19
New Contributor II

Re: execute cmd delete from script

Can any one please help me on this delete file from a folder
punitpopli
Contributor III

Re: execute cmd delete from script

Check if your variable is populating correctly.

if not then try to break the path, file name and file extension, this should work.

ssriramin19
New Contributor II

Re: execute cmd delete from script

Even When I tried to delete excel file from my local system , I am getting following error
EXECUTE cmd.exe/C Del "C:\Users\kglt280\Documents\requirements_2\New folder (8)\Vietnam RCA Template.xlsx";

Can anyone please help me on this on how to resolve the error ?

Please suggest
punitpopli
Contributor III

Re: execute cmd delete from script

check if you had read write permission on the folder you are performing action
ssriramin19
New Contributor II

Re: execute cmd delete from script

Will execute command work in QV version 12 ? I am unable to perform the delete the file using execute command in version 12 .

The Cmd.exe/C Del "\\ file name" works properly in CMD .
Please suggest
punitpopli
Contributor III

Re: execute cmd delete from script

check if below setting are enables in your system