[過去ログ] 【.cmd】 バッチファイルスクリプト %12 【.bat】©2ch.net (1002レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
620
(1): 2018/07/14(土)06:43 ID:8rUsawXH(1/3)調 AAS
>>612
if文の不具合は引用符絡みのようなので
それを削除して書き直しました

@echo off
call :set_arg arg
if not defined arg goto :eof
for %%f in (%arg%) do echo "%%~nxf"
pause & goto :eof

:set_arg
setlocal enabledelayedexpansion
set a=!cmdcmdline!
set /a b=0,n=0
set "s=" & set "c=/" & set "e= " & set "d=""
:x1
if not !a:~%b%^,1!==!c! set /a b+=1 & goto x1
:x2
if !a:~%b%^,1!==!d! set /a n+=1
if !n! equ 3 set /a b+=2 & goto x3
set /a b+=1 & goto x2

下に続く
621: 2018/07/14(土)06:43 ID:8rUsawXH(2/3)調 AAS
:x3
set a=!a:~%b%,-1!& set /a b=0
:x4
if not defined a goto x8
if !a:~%b%^,1!==!d! set /a n=0 & goto x6
:x5
if not !a:~%b%^,1!==!e! set /a b+=1 & goto x5
set s=!s!!d!!a:~0,%b%!!d!!e!& set /a b+=1
set a=!a:~%b%!& set /a b=0 & goto x4
:x6
if !a:~%b%^,1!==!d! set /a n+=1
if !n! equ 2 set /a b+=1 & goto x7
set /a b+=1 & goto x6
:x7
set s=!s!!a:~0,%b%!!e!& set /a b+=1
set a=!a:~%b%!& set /a b=0 & goto x4
:x8
if defined s set s=!s:~0,-1!
endlocal & set %1=%s%
623: 2018/07/14(土)18:45 ID:8rUsawXH(3/3)調 AAS
>>622
すみません。:x3 の下の行を下記に訂正します

:x3
set a=!a:~%b%,-1!!e!& set /a b=0
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.038s