{"id":335,"date":"2014-06-08T19:01:18","date_gmt":"2014-06-08T10:01:18","guid":{"rendered":"http:\/\/wp.ultimai.org\/wp\/?p=335"},"modified":"2014-06-08T19:02:13","modified_gmt":"2014-06-08T10:02:13","slug":"objfilesys","status":"publish","type":"post","link":"http:\/\/wp.ultimai.org\/?p=335","title":{"rendered":"\u30b9\u30e9\u30a4\u30b9\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u540d\u5909\u3057\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u308bvbscript"},"content":{"rendered":"<p>Option Explicit<br \/>\nDim objFileSys, strScriptPath , str_path<br \/>\nDim strFilePath, objFile,str_from ,str_to<br \/>\nDim i , FileName, picName, picNo, newName<\/p>\n<p>Set objFileSys = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<\/p>\n<p>strScriptPath = Replace(WScript.ScriptFullName,WScript.ScriptName,&#8221;&#8221;)<br \/>\npicName = &#8220;gochiso0&#8221;<br \/>\npicNo = &#8220;01&#8221;<\/p>\n<p>If Not objFileSys.FolderExists(&#8220;.\\page&#8221; &#038; picNo) Then<br \/>\nstr_path = objFileSys.CreateFolder(&#8220;.\\page&#8221; &#038; picNo) &#038; &#8220;\\&#8221; &#8216;\u30d5\u30a9\u30eb\u30c0\u4f5c\u6210<br \/>\nelse<br \/>\nstr_path =&#8221;.\\page&#8221; &#038; picNo &#038; &#8220;\\&#8221;<br \/>\nend if<\/p>\n<p>for i=1 to 4<\/p>\n<p>if i > 2 then<br \/>\n FileName = picName &#038; picNo &#038; &#8220;_r2_c&#8221; &#038; i-2 &#038; &#8220;.png&#8221;<br \/>\n newName  = picName &#038; picNo &#038; &#8220;_1_&#8221; &#038; i-2 &#038; &#8220;-2.png&#8221;<\/p>\n<p> str_from = strScriptPath &#038; FileName  &#8216;\u53e4\u3044\u30d1\u30b9\u3068\u540d\u524d<br \/>\n str_to   = str_path &#038; newName   &#8216;\u65b0\u3057\u3044\u30d1\u30b9\u3068\u540d\u524d<\/p>\n<p>else<br \/>\n FileName = picName &#038; picNo &#038; &#8220;_r1_c&#8221; &#038; i &#038; &#8220;.png&#8221;<br \/>\n newName  = picName &#038; picNo &#038; &#8220;_1_&#8221; &#038; i &#038; &#8220;-1.png&#8221;<\/p>\n<p> str_from = strScriptPath &#038; FileName  &#8216;\u53e4\u3044\u30d1\u30b9\u3068\u540d\u524d<br \/>\n str_to   = str_path &#038; newName   &#8216;\u65b0\u3057\u3044\u30d1\u30b9\u3068\u540d\u524d<\/p>\n<p>end if<\/p>\n<p>  Call objFileSys.MoveFile(str_from, str_to)&#8217;\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5909\u66f4\u3057\u3066\u79fb\u52d5\u3059\u308b<\/p>\n<p>next<\/p>\n<p>Set objFile = Nothing<br \/>\nSet objFileSys = Nothing<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Option Explicit Dim objFi [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-335","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":0,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"wp:attachment":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}