{"id":5125,"date":"2014-03-30T19:03:26","date_gmt":"2014-03-30T19:03:26","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-prevent-batch-window-from-closing-when-error-occurs-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:03:26","modified_gmt":"2014-03-30T19:03:26","slug":"how-to-prevent-batch-window-from-closing-when-error-occurs-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-prevent-batch-window-from-closing-when-error-occurs-collection-of-common-programming-errors\/","title":{"rendered":"How to prevent batch window from closing when error occurs?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to write batch script to <strong>create a folder if it does not already exist<\/strong>. Following up the online examples, below is my script.<\/p>\n<p>The problem is; first <code>pause<\/code> works, then probably due to syntax error <strong>the window closes<\/strong> even before reaches to the second <code>pause<\/code>, so I can&#8217;t really tell which part of my script is wrong.<\/p>\n<p>Could anyone show me how to prevent closing window so that I can see what&#8217;s on the window?<\/p>\n<pre><code>@echo off\n\n:copy theme images over\n:designer\necho copying theme images over...\npause\nif not exist \"%K2DIR%\\K2 SmartForms Runtime\\Styles\\Themes\\Sharepoint 2013\\rich_text\"\n(\n    md \"%K2DIR%\\K2 SmartForms Runtime\\Styles\\Themes\\Sharepoint 2013\\rich_text333\"\n)\n\npause\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to write batch script to create a folder if it does not already exist. Following up the online examples, below is my script. The problem is; first pause works, then probably due to syntax error the window closes even before reaches to the second pause, so I can&#8217;t really tell which part of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5125","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5125"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5125\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}