How to write a batch script in windows - getting start

A batch script is a text file that contains certain commands that are executed in sequence. It is used to simplify certain repetitive tasks or routines in the Windows, DOS and OS/2 operating systems, and is also used in complex network and system administration.
A batch script has a file extension of .bat, .cmd or .btm. We mostly use the .bat format.

create simple batch script and run

  • Open a text file, such as a Notepad or WordPad document.
  • Add your commands, starting with @echo [off], followed by, each in a new line, title [title of your batch script], echo [first line], and pause.
  • Save your file with the file extension BAT, for example, test.bat.
  • To run your batch file, double-click the BAT file you just created.
  • You can edit the script by right clicking on the file.
  • post image

    The corresponding output of the running screen as follows. this is opening from the very known windows cmd.

    post image

    Rasika Preethiraj

    A technophile at icrony since 2012, In a quest to programmatic automations for scaled organisations through the use of python, php, autoit and machine learning


    Comments


    Post a Comment



    Trending

    Latest Posts

    Tags

    Newsletter

    Subscribe to our newsletter for good news, sent out every month.