{"id":1064,"date":"2017-07-22T22:32:18","date_gmt":"2017-07-22T21:32:18","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1064"},"modified":"2017-07-22T22:32:18","modified_gmt":"2017-07-22T21:32:18","slug":"renaming-folder-en-mass","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2017\/07\/22\/renaming-folder-en-mass\/","title":{"rendered":"Renaming a folder en-mass"},"content":{"rendered":"<p>I was figuring out a way to rename a folder en-mass which took me a few seconds, instead of about an hour of clicking.<\/p>\n<p>Linux automation is a win.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# mmv &quot;Documentary - National Geometry series-*.avi&quot; &quot;#1.avi&quot;\r\n<\/pre>\n<p>I had some old tv series but they were all prefixed with the same filename &#8216;Documentary &#8211; National Geometry series&#8217; before their volume number and title. So I found the above command to strip that out for all 100 of them, in a single command. Basically #1 is where * is in the source command regular expression, so everything after the source expression and between the *.<\/p>\n<p>It&#8217;s a really nice utility and preferred on BSD systems to perl rename imo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was figuring out a way to rename a folder en-mass which took me a few seconds, instead of about an hour of clicking. Linux automation is a win. # mmv &quot;Documentary &#8211; National Geometry series-*.avi&quot; &quot;#1.avi&quot; I had some &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2017\/07\/22\/renaming-folder-en-mass\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[111,112,113,9,7,114],"tags":[],"class_list":["post-1064","post","type-post","status-publish","format-standard","hentry","category-bsd","category-freebsd","category-freenas","category-linux","category-management-tools","category-plex"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1064"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1064\/revisions"}],"predecessor-version":[{"id":1065,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1064\/revisions\/1065"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}