Generating and Executing a Batch File In QlikView

Introduction

There is a given easy way to generate a QlikView batch file. The Batch file loads the rows of the text in a file into a table that the user wants. The Store command will write that table into a text or batch file. The separation will not be allowed when there is only one column in the table.

The next step is to generate a batch file.

Step 1:
Notepad will be used to create the code as a text file, if you want to make the batch file then simply save it as a .bat. The .bat is the extension for batch files. You can open Notepad by simply clicking:

"Start" -> "All Programs" -> "Accessories" -> "Notepad"

 Then Notepad will appear. Alternatively you can enter notepad into the Run box. Then the window will look like this:

Window Of Notepad

The following are some basic batch commands:

  • START: The Start command will used to run a file with it's default application.
  • @ECHO OFF: This command will be used to hide the text that is normally output.
  • MKDIR:: This command will be used to make a directory.
  • RMDIR: This command will be used to remove a directory.
  • DEL: This will be used to delete a file.
  • COPY: This will be used to copy a file.

So, those are some basic commands, that will be used in a batch file.

Step 2: Write this code using Notepad: This code will be used to loop itself in a command prompt.

Write the code into Notepad

Step 3: Save the file: 
After placing the code in Notepad, you can save the file using the Batch file type. Click "File" -> "Save as" then enter a name for the program followed by .bat.



Then:

Write the file name and save it

 Step 4: Run the file. You can run the file by simply double-clicking on the file, then it will show the output in the command prompt.

Run the file

So, this is the basic procedure to create a simple batch file.

There are basic examples for learning how to execute a batch file in QlikView.

Step 1:
Open the QlikView application, then go to:

"File" -> "New", then this window will be opened:

After clicking New option

Step 2:
In this step we go to the Edit Script Window, this window looks like this:

Go to Edit Script

Step 3: Write the code in the Edit Script, this code will be used to move all text files from one location to another location.

Write code in edit

Step 4: After writing the code, we need to debug our code, simply click on the Debug button.

Debug the code

After debugging, we can determine the errors very easily in our program; the window looks like this:

After Debugging

Step 5: Simply click on the Run button. We run the code; then after debugging, this process will be done.

Run the fie

After running, this window looks like this:



This is the last step. The script will be finished and our batch files will be transferred from one location to another location very easily.

Summary

This article shows the execution of a batch file in QlikView in a very simple manner. If you are a publisher then use another example for execution.


Similar Articles