{"id":52,"date":"2005-01-28T12:42:00","date_gmt":"2005-01-28T12:42:00","guid":{"rendered":"http:\/\/markwilson.me.uk\/blog\/2005\/01\/batch-file-command-reference.htm"},"modified":"2007-06-11T21:58:43","modified_gmt":"2007-06-11T20:58:43","slug":"batch-file-command-reference","status":"publish","type":"post","link":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm","title":{"rendered":"Batch file command reference"},"content":{"rendered":"<p><!--110691655562474841-->Even though modern versions of Windows have rich scripting capabilities I regularly find myself writing batch (.bat) or command (.cmd) files for automating system tasks, sometimes during migrations from older versions of MS-DOS or Windows which do not have the same command set.  I generally consider my batch file writing skills to be pretty good, but I have found the <a href=\"http:\/\/www.computerhope.com\/batch.htm\">Computer Hope Batch File Help<\/a> website to be a useful resource for checking syntax between different operating system versions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Even though modern versions of Windows have rich scripting capabilities I regularly find myself writing batch (.bat) or command (.cmd) files for automating system tasks, sometimes during migrations from older versions of MS-DOS or Windows which do not have the same command set. I generally consider my batch file writing skills to be pretty good, &hellip; <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Batch file command reference<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[82,16],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","tag-scripting","tag-useful-websites"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Batch file command reference - markwilson.it<\/title>\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.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Batch file command reference - markwilson.it\" \/>\n<meta property=\"og:description\" content=\"Even though modern versions of Windows have rich scripting capabilities I regularly find myself writing batch (.bat) or command (.cmd) files for automating system tasks, sometimes during migrations from older versions of MS-DOS or Windows which do not have the same command set. I generally consider my batch file writing skills to be pretty good, &hellip; Continue reading Batch file command reference\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm\" \/>\n<meta property=\"og:site_name\" content=\"markwilson.it\" \/>\n<meta property=\"article:published_time\" content=\"2005-01-28T12:42:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2007-06-11T20:58:43+00:00\" \/>\n<meta name=\"author\" content=\"Mark Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:site\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Wilson\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm\"},\"author\":{\"name\":\"Mark Wilson\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"headline\":\"Batch file command reference\",\"datePublished\":\"2005-01-28T12:42:00+00:00\",\"dateModified\":\"2007-06-11T20:58:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm\"},\"wordCount\":83,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"keywords\":[\"Scripting\",\"Useful Websites\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm\",\"name\":\"Batch file command reference - markwilson.it\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\"},\"datePublished\":\"2005-01-28T12:42:00+00:00\",\"dateModified\":\"2007-06-11T20:58:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2005\\\/01\\\/batch-file-command-reference.htm#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Batch file command reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/\",\"name\":\"markwilson.it\",\"description\":\"get-info -class technology | write-output &gt; \\\/dev\\\/web\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\",\"name\":\"Mark Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"width\":800,\"height\":800,\"caption\":\"Mark Wilson\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\"},\"description\":\"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.\",\"sameAs\":[\"http:\\\/\\\/www.markwilson.co.uk\\\/\",\"https:\\\/\\\/www.instagram.com\\\/markwilsonuk\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/markawilson\\\/\",\"https:\\\/\\\/x.com\\\/markwilsonit\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCWHlZCoHRTocdvtrOJ2IL4A\"],\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/author\\\/mark-wilson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Batch file command reference - markwilson.it","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.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm","og_locale":"en_GB","og_type":"article","og_title":"Batch file command reference - markwilson.it","og_description":"Even though modern versions of Windows have rich scripting capabilities I regularly find myself writing batch (.bat) or command (.cmd) files for automating system tasks, sometimes during migrations from older versions of MS-DOS or Windows which do not have the same command set. I generally consider my batch file writing skills to be pretty good, &hellip; Continue reading Batch file command reference","og_url":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm","og_site_name":"markwilson.it","article_published_time":"2005-01-28T12:42:00+00:00","article_modified_time":"2007-06-11T20:58:43+00:00","author":"Mark Wilson","twitter_card":"summary_large_image","twitter_creator":"@markwilsonit","twitter_site":"@markwilsonit","twitter_misc":{"Written by":"Mark Wilson"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm#article","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm"},"author":{"name":"Mark Wilson","@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"headline":"Batch file command reference","datePublished":"2005-01-28T12:42:00+00:00","dateModified":"2007-06-11T20:58:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm"},"wordCount":83,"commentCount":0,"publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"keywords":["Scripting","Useful Websites"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm","url":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm","name":"Batch file command reference - markwilson.it","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#website"},"datePublished":"2005-01-28T12:42:00+00:00","dateModified":"2007-06-11T20:58:43+00:00","breadcrumb":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.markwilson.co.uk\/blog\/2005\/01\/batch-file-command-reference.htm#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.markwilson.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Batch file command reference"}]},{"@type":"WebSite","@id":"https:\/\/www.markwilson.co.uk\/blog\/#website","url":"https:\/\/www.markwilson.co.uk\/blog\/","name":"markwilson.it","description":"get-info -class technology | write-output &gt; \/dev\/web","publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.markwilson.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468","name":"Mark Wilson","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","url":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","width":800,"height":800,"caption":"Mark Wilson"},"logo":{"@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1"},"description":"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.","sameAs":["http:\/\/www.markwilson.co.uk\/","https:\/\/www.instagram.com\/markwilsonuk\/","https:\/\/www.linkedin.com\/in\/markawilson\/","https:\/\/x.com\/markwilsonit","https:\/\/www.youtube.com\/channel\/UCWHlZCoHRTocdvtrOJ2IL4A"],"url":"https:\/\/www.markwilson.co.uk\/blog\/author\/mark-wilson"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1148,"url":"https:\/\/www.markwilson.co.uk\/blog\/2008\/08\/using-bits-to-manage-file-distribution.htm","url_meta":{"origin":52,"position":0},"title":"Using BITS to manage file distribution","author":"Mark Wilson","date":"Wednesday 6 August 2008","format":false,"excerpt":"Microsoft's Background Intelligent Transfer Service (BITS) has been around since Windows 2000 SP3 and provides a \"firewall-friendly\" means of transferring files across the network which also allows for restarts. It's also the file transfer mechanism used for Windows updates (but is not exclusively used for Microsoft products) and is now\u2026","rel":"","context":"In \"Microsoft Windows\"","block_context":{"text":"Microsoft Windows","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/windows"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4245,"url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/08\/handling-camera-raw-images-on-old-versions-of-os-x.htm","url_meta":{"origin":52,"position":1},"title":"Handling camera raw images on old versions of OS X","author":"Mark Wilson","date":"Monday 20 August 2012","format":false,"excerpt":"I use Adobe Lightroom for most of my digital photography workflow but as our family takes more and more pictures on a variety of cameras, other family members need to process images - and I'm not letting them near my Lightroom catalogue! As we tend to use iPhoto every year\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":900,"url":"https:\/\/www.markwilson.co.uk\/blog\/2007\/09\/mounting-virtual-hard-disks-in-windows-vista.htm","url_meta":{"origin":52,"position":2},"title":"Mounting virtual hard disks in Windows Vista","author":"Mark Wilson","date":"Wednesday 12 September 2007","format":false,"excerpt":"Microsoft's Virtual PC Guy (Ben Armstrong) wrote a blog post last year about using the VHDMount utility from Virtual Server 2005 R2 SP1 with a few registry edits to enable right-click mounting\/dismounting of virtual hard disk (.VHD) files. As .VHD files become ever more prevalent, this is a really useful\u2026","rel":"","context":"In \"Microsoft Virtual Server\/Hyper-V\"","block_context":{"text":"Microsoft Virtual Server\/Hyper-V","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/hyper-v"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1358,"url":"https:\/\/www.markwilson.co.uk\/blog\/2011\/11\/souping-up-synctoy.htm","url_meta":{"origin":52,"position":3},"title":"Souping up SyncToy","author":"Mark Wilson","date":"Wednesday 9 November 2011","format":false,"excerpt":"I used to back up my work PC to a set of Virtual Hard Disk (.VHD) files until one day I needed to recover from a failure, and I found that the hard drive encryption software we use prevented me from running a restore. That forced me to find another\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":267,"url":"https:\/\/www.markwilson.co.uk\/blog\/2006\/02\/microsofts-next-generation-command.htm","url_meta":{"origin":52,"position":4},"title":"Microsoft&#8217;s next generation command shell","author":"Mark Wilson","date":"Friday 10 February 2006","format":false,"excerpt":"Back in June 2004, I got in a panic because I heard that VBScript was about to be phased out. Don Jones commented that VBScript will still be there in Windows, it just won't be developed any further, then later I heard about the new Microsoft scripting host (MSH) shell\u2026","rel":"","context":"In \"Microsoft Windows\"","block_context":{"text":"Microsoft Windows","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/windows"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":478,"url":"https:\/\/www.markwilson.co.uk\/blog\/2004\/09\/unattended-iis-installation-after.htm","url_meta":{"origin":52,"position":5},"title":"Unattended IIS installation after the operating system has been installed","author":"Mark Wilson","date":"Monday 13 September 2004","format":false,"excerpt":"One of my clients needed to provide an FTP server service on some of its XP PCs, but as an addition to the existing standard operating environment (i.e without altering the core build). Of course, Internet Information Services (including the FTP Publishing service) may be installed as part of an\u2026","rel":"","context":"In \"Microsoft Internet Information Server\/Services\"","block_context":{"text":"Microsoft Internet Information Server\/Services","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/iis"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}