{"id":789,"date":"2011-12-01T20:54:34","date_gmt":"2011-12-02T02:54:34","guid":{"rendered":"http:\/\/bateru.com\/news\/?p=789"},"modified":"2011-12-01T20:59:43","modified_gmt":"2011-12-02T02:59:43","slug":"code-of-the-day-dos-open-an-existing-file-or-create-it-if-it-doesnt-exist","status":"publish","type":"post","link":"https:\/\/bateru.com\/news\/2011\/12\/code-of-the-day-dos-open-an-existing-file-or-create-it-if-it-doesnt-exist\/","title":{"rendered":"Code of the Day: DOS Open an existing file or create it if it doesn&#8217;t exist"},"content":{"rendered":"<pre lang=\"dos\">\r\nREM filename: openAndORCreateFileTXT.bat\r\nrem\\ >> file.txt && file.txt\r\n<\/pre>\n<p>The following will open a existing file named file.txt. However, it if doesn&#8217;t exist then it will create it for you then open it. This is very useful.<\/p>\n<p>&#8220;rem\\&#8221; Let&#8217;s you return a empty character.<br \/>\n&#8220;>> file.txt&#8221; appends the returned value on the left hand side, which in this case is nothing.<br \/>\n&#8220;&#038;&#038; file.txt&#8221; once the left hand operation is done, then open the file ( file.txt).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>REM filename: openAndORCreateFileTXT.bat rem\\ >> file.txt &#038;&#038; file.txt The following will open a existing file named file.txt. However, it if doesn&#8217;t exist then it will create it for you then open it. This is very useful. &#8220;rem\\&#8221; Let&#8217;s you return a empty character. &#8220;>> file.txt&#8221; appends the returned value on the left hand side, which &hellip; <a href=\"https:\/\/bateru.com\/news\/2011\/12\/code-of-the-day-dos-open-an-existing-file-or-create-it-if-it-doesnt-exist\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Code of the Day: DOS Open an existing file or create it if it doesn&#8217;t exist<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,10],"tags":[30,181],"class_list":["post-789","post","type-post","status-publish","format-standard","hentry","category-entertainment","category-tutorials","tag-code-of-the-day","tag-dos"],"_links":{"self":[{"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/posts\/789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/comments?post=789"}],"version-history":[{"count":5,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/posts\/789\/revisions"}],"predecessor-version":[{"id":799,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/posts\/789\/revisions\/799"}],"wp:attachment":[{"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/media?parent=789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/categories?post=789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bateru.com\/news\/wp-json\/wp\/v2\/tags?post=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}