{"id":7514,"date":"2021-11-24T09:55:25","date_gmt":"2021-11-24T09:55:25","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=7514"},"modified":"2021-11-24T09:55:51","modified_gmt":"2021-11-24T09:55:51","slug":"batch-rename-epoch-time-to-human-time","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-rename-epoch-time-to-human-time\/28971.html","title":{"rendered":"Batch Rename &#8211; Epoch Time To Human Time"},"content":{"rendered":"<p>hi, I have a bunch of htm files (B1-60164.htm, B1-60165.htm, etc.) with runs a javascript to convert epoch time to normal human time.<\/p>\n<p>i managed to determine the script call (not the actual js):<\/p>\n<p>&lt;SCRIPT language=&#8221;JavaScript&#8221;&gt;document.write(format_date(1364400000));&lt;\/SCRIPT&gt;<\/p>\n<p>my intention is to extract the epoch time 1364400000 and convert it into yymm date format, and append to the filename (1303_B1-60164.htm, 1303_B1-60165.htm, etc.)<\/p>\n<p>fyi: epoch time 1364400000 is 18 March 2013, GTM+8.<\/p>\n<p>in short, extract the epoch time within htm files, convert to human time, and append yymm (year+month) to the filename.<\/p>\n<p>this is via Windows batch script\/command.<\/p>\n<p>thanks!<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":27},"question-category":[55],"question_tags":[],"class_list":["post-7514","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\/7514","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=7514"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=7514"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=7514"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=7514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}