{"id":5122,"date":"2019-07-03T09:00:01","date_gmt":"2019-07-03T00:00:01","guid":{"rendered":"https:\/\/cg-method.com\/?p=5122"},"modified":"2022-12-23T18:03:59","modified_gmt":"2022-12-23T09:03:59","slug":"windows-bat-increment-numbers","status":"publish","type":"post","link":"https:\/\/cg-method.com\/windows-bat-increment-numbers\/","title":{"rendered":"Windows\u30d0\u30c3\u30c1\u2502\u5148\u982d\u306e\u9023\u756a\u3092\u3064\u3051\u76f4\u3059\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb"},"content":{"rendered":"\n

AE\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30ea\u30b9\u30c8\u8868\u793a\u306b\u3057\u305f\u306e\u306f\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u4e26\u3073\u9806\u304c\u6c17\u306b\u306a\u308b\u306e\u3067\u30d5\u30a1\u30a4\u30eb\u76ee\u306e\u5148\u982d\u306b\u9023\u756a\u3064\u3051\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

\u3057\u304b\u3057\u9593\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u9023\u756a\u632f\u308a\u76f4\u3059\u306e\u3082\u9762\u5012\u306a\u306e\u3067\u30d0\u30c3\u30c1\u3067\u3064\u3051\u76f4\u3059\u51e6\u7406\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u7279\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306e\u9023\u756a\u3092\u3064\u3051\u76f4\u3059\u30d0\u30c3\u30c1<\/h2>\n\n\n\n

\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u7279\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306e\u9023\u756a\u3092\u3064\u3051\u76f4\u3059\u30d0\u30c3\u30c1\u3067\u3059\u3002<\/p>\n\n\n\n

@echo off\nsetlocal EnableDelayedExpansion\nset count=1\nfor \/f "tokens=*" %%a IN ('dir \/b *.jsx') do (call :sub "%%a")\n\n:sub\nset name=%1\nset num=00%count%\nren %1 %num:~-3%_%name:~4%\nset \/a count+=1\n<\/code><\/pre><\/div>\n\n\n\n

\u203b%name:~4%<\/code>\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u306e4\u6587\u5b57\u76ee\u304b\u3089\u3001\u3064\u307e\u308a\u5148\u982d\u306e3\u6587\u5b57\uff0801_\uff09\u306f\u524a\u9664\u3057\u3066\u304b\u3089\u5148\u982d\u306b\u9023\u756a\u3092\u8ffd\u52a0\u3057\u3066\u307e\u3059\u3002<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n

\u300c\u9001\u308b\u300d\u304b\u3089\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b\u9023\u756a\u3092\u3064\u3051\u76f4\u3059\u30d0\u30c3\u30c1<\/h2>\n\n\n\n

\u300c\u9001\u308b\u300d\u304b\u3089\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b\u9023\u756a\u3092\u3064\u3051\u76f4\u3059\u30d0\u30c3\u30c1\u3067\u3059\u3002<\/p>\n\n\n\n

@echo off \nsetlocal enabledelayedexpansion \nset count=1001\nfor \/f "tokens=*" %%n IN ('dir \/b *.jsx') do (call :sub "%%n")\nexit \/b\n\n:sub\nset name=%1\nren %1 %count:~-3%%name:~4%\nset \/a count+=1<\/code><\/pre><\/div>\n\n\n\n

\u300c\u9001\u308b\u300d\u304b\u3089\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306b\u6587\u5b57\u3092\u8ffd\u52a0\u3059\u308b\u30d0\u30c3\u30c1<\/h2>\n\n\n\n

\u304a\u307e\u3051\u3067\u3059\u3002<\/p>\n\n\n\n

\u6587\u5b57\u5316\u3051\u3059\u308b\u6642\u306f\u6587\u5b57\u30b3\u30fc\u30c9\u3092ANSI\u306b\u5909\u66f4\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n

for %%F in (*.txt) do ren "%%F" "%%~nF"_\u30b5\u30f3\u30d7\u30eb"%%~xF"<\/code><\/pre><\/div>\n\n\n\n

\u307e\u3068\u3081<\/h2>\n\n\n\n

\u4eca\u56de\u306eBAT\u306f\u5730\u5473\u306b\u91cd\u5b9d\u3057\u3066\u3044\u3066\u6c17\u306b\u5165\u3063\u3066\u307e\u3059\u3002<\/p>\n\n\n\n

\u30c7\u30fc\u30bf\u6574\u7406\u306e\u969b\u306b\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

AE\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30ea\u30b9\u30c8\u8868\u793a\u306b\u3057\u305f\u306e\u306f\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u4e26\u3073\u9806\u304c\u6c17\u306b\u306a\u308b\u306e\u3067\u30d5\u30a1\u30a4\u30eb\u76ee\u306e\u5148\u982d\u306b\u9023\u756a\u3064\u3051\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u9593\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u9023\u756a\u632f\u308a\u76f4\u3059\u306e\u3082\u9762\u5012\u306a\u306e\u3067\u30d0\u30c3\u30c1\u3067\u3064\u3051\u76f4\u3059\u51e6\u7406\u3092\u66f8\u3044\u3066\u307f\u307e\u3057 […]<\/p>\n","protected":false},"author":1,"featured_media":5125,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pochipp_cv_data":"","swell_btn_cv_data":"","footnotes":""},"categories":[435],"tags":[],"_links":{"self":[{"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/posts\/5122"}],"collection":[{"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/comments?post=5122"}],"version-history":[{"count":0,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/posts\/5122\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/media\/5125"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/media?parent=5122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/categories?post=5122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/wp-json\/wp\/v2\/tags?post=5122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}