Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make sense of a batch file?

I have no prior experience working with batch files or shell scripting in general. I need to understand the operations being carried out by a batch file used in a related project. Any resource that gives exhaustive list of batch file commands and what each one does?

like image 525
Shailesh Tainwala Avatar asked Dec 17 '22 04:12

Shailesh Tainwala


1 Answers

Once you get acquainted with the general .BAT file information, using some of the pointers to useful information that other users have posted in the other answers, you might try some of the following strategies that help you understand and analyze the BAT files used int your projects:

  1. add an ECHO command in front of all command invocations

  2. read HELP command for each command line in the BAT file

  3. execute at the command prompt each command line in the BAT file

  4. remove the @echo off at the top of the .BAT file, and see how the BAT progresses

  5. add some PAUSEs to keep viewing some commands on screen before they disappear.

like image 79
PA. Avatar answered Jan 14 '23 11:01

PA.