
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Script to move a file from one folder to another
Hi,
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.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can create vb macto and use it in your QV script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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."

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi whiteline,
Please try this: execute cmd.exe /c del "Z:\My Documents\Test File to Delete.txt";
Regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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\";
