[過去ログ] 【.cmd】 バッチファイルスクリプト %12 【.bat】©2ch.net (1002レス)
前次1-
抽出解除 レス栞

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
612
(2): 2018/07/12(木)21:39 ID:Gmf0IrMF(5/5)調 AAS
最初に検証したファイル名は
aーa b.txt
です
614: 2018/07/12(木)22:45 ID:+klw6xr1(8/9)調 AAS
>>612
とりあえず最初の3行を

@echo off
setlocal enabledelayedexpansion
set "a=!cmdcmdline:"=""!"
set "a=!a:ー=/1!"

最後の5行を

:x8
set "s=!s:/1=ー!"
set "s=!s:""="!"
endlocal & set s=%s%
for %%f in (%s%) do echo "%%~nxf"
pause

ダメ文字の詳細は不明
まだ有ったら、/2 /3 ... 置換
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

下に続く
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.042s