Skip to main content
Product Release Webinar: Qlik Insider airing December 6! REGISTER TODAY!
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script to move a file from one folder to another


I was wondering if it is possible to move files to another folder within my QV script?

For example, if I have some files in say a folder called "Upload Data".  Can you move all the files contained in that folder to a folder called "Archive"?

Any help would be greatly appreciated.


7 Replies
Not applicable

you can create vb macto and use it in your QV script

Specialist II
Specialist II

I think you should use the console command to move files in the load script, I´m not sure but I think is something like this:

execute cmd.exe /c move <Source Folder> <Destiny Folder>;

You need to enable the execution of external programs, if you want to check if the script works you could try with this to delete some file:

execute cmd.exe /c del <File>; //name or path of the file to delete

Hope this helps

Not applicable

Thanks Jose.

I've tried doing that and it doesn't seem to work:

Execute cmd.exe /c del <Z:\My Documents\Test File to Delete.txt>;

Is there something else I should be doing?

Master II
Master II

Try without <>.

Look at help 'execute'.

Before writing a command in a script you can always check it with a Windows Command Prompt.

In your case: del <Z:\My Documents\Test File to Delete.txt>

It definetly says that "The syntax of the command is incorrect."

Specialist II
Specialist II

Yes, the <> were only to mark  that there you had to write the name of the file but you have to discard them

Try this and tell me if wroks fine

execute cmd.exe /c del Z:\My Documents\Test File to Delete.txt;


Not applicable

Hi whiteline,

Please try this: execute cmd.exe /c del "Z:\My Documents\Test File to Delete.txt";


Not applicable

Hi Rk,

I know its very old question. but wanted to reply if some one would use in the future

execute cmd.exe  /c move "C:\Users\kishravi\Desktop\CRM\*.txt" "C:\Users\kishravi\Desktop\CRM\Test\";