{"id":317,"date":"2021-10-20T14:52:50","date_gmt":"2021-10-20T14:52:50","guid":{"rendered":"https:\/\/xuan.guru\/?p=317"},"modified":"2021-10-20T16:54:42","modified_gmt":"2021-10-20T16:54:42","slug":"move-all-mp4-files-into-dated-directory","status":"publish","type":"post","link":"https:\/\/xuan.co.uk\/?p=317","title":{"rendered":"move all mp4 files into dated directory"},"content":{"rendered":"\n<p>The objective of this bat file is recursive search for MP4s in a source folder and move them into a single dated folder.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@echo off\nfor \/f \"tokens=2 delims==\" %%a in ('wmic OS Get localdatetime \/value') do set \"dt=%%a\"\nset \"YY=%dt:~2,2%\" &amp; set \"YYYY=%dt:~0,4%\" &amp; set \"MM=%dt:~4,2%\" &amp; set \"DD=%dt:~6,2%\"\nset \"HH=%dt:~8,2%\" &amp; set \"Min=%dt:~10,2%\" &amp; set \"Sec=%dt:~12,2%\"\n\nset \"datestamp=%YYYY%%MM%%DD%\" &amp; set \"timestamp=%HH%%Min%%Sec%\"\nset \"fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%\"\necho datestamp: \"%datestamp%\"\necho timestamp: \"%timestamp%\"\necho fullstamp: \"%fullstamp%\"\n\n\nFOR \/R \"X:\\SOURCE\" %%i IN (*.mp4) DO (\nMD \"X:\\DESTINATION\\%datestamp%\\\"\nMOVE \"%%i\" \"X:\\DESTINATION\\%datestamp%\\\")\n\nrem delete the source files left over and folders\nx:\ncd \"X:\\SOURCE\"\n\ndel * \/S \/q\n\nrd \/s \/q .<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The objective of this bat file is recursive search for MP4s in a source folder and move them into a single dated folder.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[65],"class_list":["post-317","post","type-post","status-publish","format-standard","hentry","category-tech-tips","tag-tech-tips"],"_links":{"self":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=317"}],"version-history":[{"count":1,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/317\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}