Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to move file to another folder

Hi all

Is it possible to create a macro to move a file to another folder from Qlikview

If so, will this work on the QV server

Regards

3 Replies
koushik_btech20
Creator
Creator

Use DOS command,

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)";

Not applicable
Author

Thanks. Is it possible to trigger a windows task from qlikview via a macro

marcus_sommer

That's possible with something like this:

Dim wshell As Object

wshell = CreateObject("WScript.Shell")

wshell.run("cmd /c schtasks.exe /run /TN "QlikView Tasks\ExportAndMail")

wshell = Nothing

whereby you could do it also within the load-script with an execute-statement like this:

execute schtasks.exe /Run /TN "QlikView Tasks\ExportAndMail";

which could be triggerred from the qmc in opposite to a macro.

- Marcus