Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a batch file

Hi

Can some tell me how to develop a batch file??

I want to create one batch file for reading data from file say 'file.txt' and this  'file.txt' contains user information like username, his/her ID, name of the application he/she has accessed etc.

Regards

Avantika

31 Replies
Not applicable
Author

Hi GandalfGray,

I wander if you can help me here.

my variable is a string with a gap in the word, the batch file upon execution gives me an error:

eg. /vFile="My Choice"

I have tested it with a string without a gap and it does work but that will prove pointless for what i am trying to do.

Any Suggestions...

Not applicable
Author

sorry excuse my typing error, was meant to say:

/VvFile="My Choice"

still gives an error though.

gandalfgray
Specialist II
Specialist II

sorry Richard, I have not used values with spaces for the /v arguments, so I have no experience of that.

/gg

Not applicable
Author

Hi Guys,

I have created batch file and scheduled it to through windows task, batch file running, but dashboard doesn't updated with the latest data.

When I do manual executing batch file then dashboard is updating, not sure where is the mistake.

Can any one come across this scenario.

Thanks,

Not applicable
Author

Hi Madu:


When you do manual executing, did the dashboard stop right after reload or did it automatically save itself and close the program?


As far as I know, batch file can only open a dashboard and reload. My guess is no matter how you run the batch file (manually or by windows task scheduler), although it is updating, but it is not automatically save the updated dashboard at the end.


Since running windows task scheduler run batch file in the background, you won't be able to click on the save button. That means you need to find a way to save and close the dashboard. I use macro triggered by post reload to save and close the dashboard.


Here are the macro script for saving and exiting:

ActiveDocument.Save
ActiveDocument.GetApplication.Quit


Hope that helps.


Cheers,


PC

gandalfgray
Specialist II
Specialist II

Hi Madu

You should not need macros for that

As I wrote before executing qv.exe with the /r switch will reload and save the qvw

/r

Reload switch. The document will be opened and the script

reloaded. Thereafter the document will be saved, and QlikView will

close itself.

Not applicable
Author

Thank you very much GandalfGray for clarifying.

Hi Madu. I am sorry for any inconvenience.

Since all my batch files are used for trigger macro, I find better control using macro for saving and closing the application. I forget about this parameter in the batch file.

Cheers,

PC

Shubham_Deshmukh
Specialist
Specialist

Hi @Miguel_Angel_Baeyens ,

How to make it for QVF ? 

Instead of Qv.exe  I have tried all below options , still not working.

qlik-sense-logo (1).png

 

 

 

Shubham

Miguel_Angel_Baeyens

You cannot.

Qlik Sense can reload apps either using the QMC so you can run only once, or schedule and create triggers, etc. or using APIs.

There is no equivalent command line in Qlik Sense Enterprise/Desktop as there is for QlikView Desktop.

See here: 

Qlik Sense: Run Reload Tasks in QMC using API: https://support.qlik.com/articles/000020784

Working with REST API to trigger reload tasks: https://community.qlik.com/t5/Qlik-Sense-Integration-Extensions-APIs/Working-with-REST-API-to-trigge...

Task: start (and related for tasks, create, update, etc.): https://help.qlik.com/en-US/sense-developer/November2019/Subsystems/RepositoryServiceAPI/Content/Sen...

Shubham_Deshmukh
Specialist
Specialist

Hi @Miguel_Angel_Baeyens ,

Thanks for the information, but can you pls tell us why it isn't so ??

Bcoz that was the simplest way to achieve the same.

Shubham