{"id":704,"date":"2015-09-28T09:39:10","date_gmt":"2015-09-28T04:09:10","guid":{"rendered":"https:\/\/www.armourinfosec.com\/?p=704"},"modified":"2017-01-16T10:26:09","modified_gmt":"2017-01-16T04:56:09","slug":"batch-file-programming","status":"publish","type":"post","link":"https:\/\/www.armourinfosec.com\/batch-file-programming\/","title":{"rendered":"Batch file Programming"},"content":{"rendered":"

[vc_row][vc_column][vc_column_text]What is a batch file?<\/strong><\/p>\n

A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again. These files contain .bat extension. This means that you have to save the batch files by using .bat extension at the end of file name. These are basically DOS commands and also can run on command prompt.<\/p>\n

How to write a batch file?<\/strong><\/p>\n

To write a batch file, first open a text editor (i.e, Notepad or Notepad++<\/strong>).<\/p>\n

In Notepad, type the commands which you want to execute.<\/p>\n

Example –
\n@echo off
\necho Hi Armour Infosec!!<\/p>\n

pause<\/p>\n

 <\/p>\n

Save them with .bat extension.<\/p>\n

The output will be shown in command prompt as –
\nHi Armour Infosec!!<\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/section>","protected":false},"excerpt":{"rendered":"

[vc_row][vc_column][vc_column_text]What is a batch file? A batch file is a collection of instructions that are used to run multiple commands…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,9],"tags":[],"yoast_head":"\nBatch file Programming | What is Batch file<\/title>\n<meta name=\"description\" content=\"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.armourinfosec.com\/batch-file-programming\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Batch file Programming | What is Batch file\" \/>\n<meta property=\"og:description\" content=\"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armourinfosec.com\/batch-file-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"Armour Infosec\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ArmourInfosec\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-28T04:09:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-16T04:56:09+00:00\" \/>\n<meta name=\"author\" content=\"Armour Infosec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:site\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Armour Infosec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armourinfosec.com\/batch-file-programming\/\",\"url\":\"https:\/\/www.armourinfosec.com\/batch-file-programming\/\",\"name\":\"Batch file Programming | What is Batch file\",\"isPartOf\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#website\"},\"datePublished\":\"2015-09-28T04:09:10+00:00\",\"dateModified\":\"2017-01-16T04:56:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\"},\"description\":\"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armourinfosec.com\/batch-file-programming\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armourinfosec.com\/batch-file-programming\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armourinfosec.com\/batch-file-programming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.armourinfosec.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Batch file Programming\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armourinfosec.com\/#website\",\"url\":\"https:\/\/www.armourinfosec.com\/\",\"name\":\"Armour Infosec\",\"description\":\"Do Your Part - Be Security Smart\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armourinfosec.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\",\"name\":\"Armour Infosec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"caption\":\"Armour Infosec\"},\"sameAs\":[\"https:\/\/www.armourinfosec.com\/\"],\"url\":\"https:\/\/www.armourinfosec.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Batch file Programming | What is Batch file","description":"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.armourinfosec.com\/batch-file-programming\/","og_locale":"en_US","og_type":"article","og_title":"Batch file Programming | What is Batch file","og_description":"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.","og_url":"https:\/\/www.armourinfosec.com\/batch-file-programming\/","og_site_name":"Armour Infosec","article_publisher":"https:\/\/www.facebook.com\/ArmourInfosec","article_published_time":"2015-09-28T04:09:10+00:00","article_modified_time":"2017-01-16T04:56:09+00:00","author":"Armour Infosec","twitter_card":"summary_large_image","twitter_creator":"@ArmourInfosec","twitter_site":"@ArmourInfosec","twitter_misc":{"Written by":"Armour Infosec","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.armourinfosec.com\/batch-file-programming\/","url":"https:\/\/www.armourinfosec.com\/batch-file-programming\/","name":"Batch file Programming | What is Batch file","isPartOf":{"@id":"https:\/\/www.armourinfosec.com\/#website"},"datePublished":"2015-09-28T04:09:10+00:00","dateModified":"2017-01-16T04:56:09+00:00","author":{"@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308"},"description":"A batch file is a collection of instructions that are used to run multiple commands at a time. It is basically a bundle of packages that are written In a sequence so that user does not have to put commands and instructions again and again.","breadcrumb":{"@id":"https:\/\/www.armourinfosec.com\/batch-file-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armourinfosec.com\/batch-file-programming\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armourinfosec.com\/batch-file-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.armourinfosec.com\/"},{"@type":"ListItem","position":2,"name":"Batch file Programming"}]},{"@type":"WebSite","@id":"https:\/\/www.armourinfosec.com\/#website","url":"https:\/\/www.armourinfosec.com\/","name":"Armour Infosec","description":"Do Your Part - Be Security Smart","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armourinfosec.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308","name":"Armour Infosec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","caption":"Armour Infosec"},"sameAs":["https:\/\/www.armourinfosec.com\/"],"url":"https:\/\/www.armourinfosec.com\/author\/admin\/"}]}},"menu_order":0,"_links":{"self":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/704"}],"collection":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/comments?post=704"}],"version-history":[{"count":0,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/704\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/media?parent=704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/categories?post=704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/tags?post=704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}