Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Creator
Creator

Re: Macro to move file to another folder

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

Highlighted
Not applicable

Re: Macro to move file to another folder

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

Highlighted
MVP & Luminary
MVP & Luminary

Re: Macro to move file to another folder

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