Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

EXECUTE command to MOVE shared files but DON'T Overwrite

Hi All,

I am able to use the EXECUTE command to MOVE my shared files from one folder to another. But as it is a daily reload, I need the new Shared Files that are to be moved the next day, have to be just pasted separately and NOT Overwrite the existing ones in the destination folder.

Below is the script I am using:

execute cmd.exe /C MOVE "C:\QVWs\*.shared"   "C:\QVWs\Shared Files Folder";

Can someone please help here?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe just use separate subfolders per day?

Let vToday = Date(Today(),'YYYY-MM-DD');

execute cmd.exe /C MKDIR "C:\QVWs\Shared Files Folder\$(vToday)";

execute cmd.exe /C MOVE "C:\QVWs\*.shared"   "C:\QVWs\Shared Files Folder\$(vToday)";

View solution in original post

4 Replies
swuehl
MVP
MVP

Maybe just use separate subfolders per day?

Let vToday = Date(Today(),'YYYY-MM-DD');

execute cmd.exe /C MKDIR "C:\QVWs\Shared Files Folder\$(vToday)";

execute cmd.exe /C MOVE "C:\QVWs\*.shared"   "C:\QVWs\Shared Files Folder\$(vToday)";

petter
Partner - Champion III
Partner - Champion III

An extra tip about moving files is that ROBOCOPY.EXE (Robust File Copy for Windows) is a very good alternative to MOVE which is also a standard program coming with Windows. It has tons of more special options....

Felt that it could be worth mentioning it. Swuehl's anwser should do the trick for you.

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi swuehl‌,

Thank you very much for this.

This has helped and worked!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thanks petter.skjolden‌,

Thank you for this additional info!