{"id":9434,"date":"2021-12-01T12:59:43","date_gmt":"2021-12-01T12:59:43","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9434"},"modified":"2021-12-01T13:03:41","modified_gmt":"2021-12-01T13:03:41","slug":"extract-day-of-the-week-in-a-dos-batch-file","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/extract-day-of-the-week-in-a-dos-batch-file\/27733.html","title":{"rendered":"Extract Day Of The Week In a Dos Batch File"},"content":{"rendered":"<p>I need to write a dos batch that works both in Winodws XP and 7 that displays the date when a file was last modified in the format (dow, dd-mm-yyyy). I succeeded to write the code that returns the date in the format dd-mm-yyyy, but I can&#8217;t find out how I can add the day of the week.<br \/>\nThis is the code that I&#8217;m currently using, that returns e.g. &#8220;06\/04\/2012&#8221;<\/p>\n<p>FOR %%a in (c:\\DB\\inventory.txt) DO SET fileDate=%%~ta<br \/>\nmsg * File last modified on %fileDate:~0,10%<\/p>\n<p>I&#8217;d like instead to have as output &#8220;Fri, 06\/04\/2012&#8221; or even better &#8220;Friday, 06\/04\/2012&#8221;<br \/>\nAny help is greatly appreciated!!!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":20},"question-category":[55],"question_tags":[],"class_list":["post-9434","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/9434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=9434"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9434"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9434"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}