Thanks for your answer
I can see the script you're talking about. My purpose is to create a file that contains this script every time a reload is done (a certain task is finished). and second step is to transfer this file from the folder whre it is created to another one that i will choose after
Do you have any clue ?
So the script log file name contains the application id, with this id you can specify, to which application belongs it.
It contains a timestamp as well, so you can specify which one is the newest.
If I were you, I'll follow these steps:
- Disable the standard mode in order to have ability to execute batch files
- Create an application, that find and copy the associated log file with execute command (the command will be created dinamically through script).
- Create an other task with this new application, chained to the original application (task event trigger)
It would be a QlikSense application (we are talking about QlikSense right?)
- Standard mode :Editing an engine ‒ Qlik Sense check at QMC, or try load data with absolute path. If it works with absolute path, the standard mode is disabled (it is enabled default).
- Example for listing all files in a folder, you can add subfield function to get appid and timestamp:
sub FileList (Root)
for each File in filelist (Root&'\*.*')
'$(File)' as Name,
call FileList ('lib://MyData')
After you selected the newest log in script you can concatenate a command and execute:
Execute 'Copy (or xcopy, robocopy) ' & '$(Log file full path)' 'c:\Destination'
1. Trigger on end of reload in self-application, that run macro:
CMDCommand = ActiveDocument.Variables("RunCMD").GetContent.String
set objShell = CreateObject("WScript.Shell")
2. Make variable RunCMD like this:
='CMD /C MOVE ' & SubField(DocumentPath(), '.', 1) & '*.log ' & Replace(DocumentPath(), DocumentName(), 'Log')
3. Be alerted that you MUST CREATE FOLDER "Log" in the folder that .QVW is in.
Macro would run after App is reloaded in full-client app either by server.
Cheers and fo to HELL with batch files.