{"id":974,"date":"2011-06-10T07:56:02","date_gmt":"2011-06-10T12:56:02","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=974"},"modified":"2011-06-10T07:56:02","modified_gmt":"2011-06-10T12:56:02","slug":"how-to-duplicate-one-file-a-lot","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=974","title":{"rendered":"How to duplicate one file &#8230; a lot"},"content":{"rendered":"<p>I had to duplicate a file&#8230; over a thousand times, for a test.<\/p>\n<p>For the MacOS, I created a shell script to do this:<\/p>\n<pre lang=\"BASH\">\n#!\/usr\/bin\/env bash\n\n# I'm passing in the filename as a parameter to the shell script,\n# which is accesible through $1\nfor (( i = 0; i < 2000; i++ )); do\n\tcp -p \"$1\" \"${i}_$1\"\ndone\n<\/pre>\n<p>On Windows, I opened a command window ( Start -> Run -> cmd.exe [Hit enter] ), changed directories to my pictures folder, then typed:<\/p>\n<pre lang=\"BATCH\">\nfor \/L %f in (1,1,2000) do copy MYDOG.JPG %fMYDOG.JPG\n<\/pre>\n<p>Thanks to my co-worker for showing me the Windows tip!<\/p>\n<p><strong>References<\/strong>:<br \/>\n<a href=\"http:\/\/www.webmasterworld.com\/webmaster\/3556284.htm\" target=\"_blank\" rel=\"noopener\">http:\/\/www.webmasterworld.com\/webmaster\/3556284.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to duplicate a file&#8230; over a thousand times, for a test. For the MacOS, I created a shell script to do this: #!\/usr\/bin\/env bash # I&#8217;m passing in the filename as a parameter to the shell script, # which is accesible through $1 for (( i = 0; i < 2000; i++ )); ... <a title=\"How to duplicate one file &#8230; a lot\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=974\" aria-label=\"Read more about How to duplicate one file &#8230; a lot\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[80,92,141,199,403],"class_list":["post-974","post","type-post","status-publish","format-standard","hentry","category-tip","tag-batch","tag-bsh","tag-copy","tag-file-copy","tag-shell"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=974"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/974\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}