The summary of ‘How to Call Batch File from a Batch File’

This summary of the video was created by an AI. It might contain some inaccuracies.

00:00:0000:07:45

The YouTube video discusses various aspects of working with batch files. The tutorial covers calling a batch script within another batch script, passing parameters in batch files, and passing and retrieving values using batch file commands. Key points include executing batch files within each other using the "call" function, passing values and variables as parameters, and utilizing the "Echo" command to retrieve values. Understanding these concepts can enhance the functionality and usefulness of batch files in scripting tasks. Some names mentioned include Rakesh.

00:00:00

In this segment of the video, the focus is on calling a batch script within another batch script. The tutorial demonstrates how to create two batch files, one for testing and one to call the test batch file, emphasizing the importance of file naming without spaces. The key action involves using the “call” function to execute the test.bat file within the main batch file. Parameters and arguments for the call function are also discussed, with an example of writing an echo statement like “Good morning.” The demonstration highlights the flow of execution from the main batch file to the test.bat file and back, showing the use of the “pause” command.

00:03:00

In this segment of the video, the main points include understanding how to pass parameters in a batch file. The speaker demonstrates passing a value (e.g., “good morning Rakesh”) using a set command and a variable (e.g., ‘a’). The parameter is then passed to the batch file and utilized by writing “%1” in the script to print the value. The demonstration shows running the script, entering a name (e.g., Rakesh), and seeing the output (“good morning Rakesh”). Additionally, the speaker explains how to pass multiple parameters by using another variable (e.g., ‘B’). The key actions involve setting the variable, passing parameters, and utilizing them in the script.

00:06:00

In this segment of the video, the speaker demonstrates how to pass and retrieve values using batch file commands. By using the “Echo” command and specifying the number of values or variables, values can be retrieved easily. The speaker shows an example where names are inputted and processed, demonstrating how the batch file works and returns the expected results. Understanding how parameters and the call function work in batch files can make this a powerful and useful command.

Scroll to Top