[過去ログ] 【.cmd】 バッチファイルスクリプト %8 【.bat】 (1001レス)
上下前次1-新
抽出解除 レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
884(4): 2012/03/23(金)10:30 AAS
@echo off
set d1="%~1"& set d2="%~2"& set d3="%~3"
call :x d1 %%d1%% & call :x d2 %%d2%% & call :x d3 %%d3%%
set a=%d1%& set b=2
:y
set a="%a:~2%
if not %a% == "" set /a b+=1 & goto y
cd /d %d1%
for /f %%i in ('dir /a-d /s /b') do set c="%%~fi"& call :z
pause & goto :eof
:x
set d="%~f2"
if not "%d:~-2% == "\" set d=%d:~0,-1%\"
set %1=%d%& goto :eof
:z
setlocal enabledelayedexpansion
set c="!c:~%b%!
endlocal & set c=%c%
set e=%d2:~0,-1%%c:~1%
if not exist %e% goto :eof
echo n| comp %c% %e% > nul 2>&1
if errorlevel 1 goto :eof
set f=%d3:~0,-1%%c:~1%
echo f| xcopy %c% %f% /y /r > nul
if not errorlevel 1 del /f %c% %e%
896: 2012/03/24(土)02:13 AAS
>>884
とりあえず set "d=%~f2" とかやると幸せになれるかもね
904(1): 2012/03/24(土)07:57 AAS
>>884
fc /bじゃなくてcompコマンドで比較するとテキストファイル以外の
バイナリファイルが正確にコンペアできないのでは?
932(1): 2012/03/27(火)03:45 AAS
引数渡しでお願いします。
あとtokens=2*とか無しね。
階層数は任意で。
>>884みたいに。
934: 2012/03/27(火)04:18 AAS
>>884よりこっちがいい
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.038s