1

.bat をドラッグ アンド ドロップすると、ファイルが取得
され、2 つのリストに配置され、両方のリストが同時に処理されます。

私はパスを渡しました: 私が持っていればうまくX:\folder\folder number\begin.txtいきます%1
foldernumber

PUSHD %~dp0
:loop
    IF ["%~f1"] EQU [""] goto :out

    echo %~f1>>list
    set /a count+=1
    SHIFT
goto :loop

POPD
:out

if %count% LEQ 1 (copy list list1 && goto :START)
set /a count2=%count%/2
more /e +%count2% list > list2

set count=0
setlocal enabledelayedexpansion
for /F "eol=; tokens=* delims=," %%i in (list) do (
    set /a count+=1
    if !count! leq !count2! echo %%i >>list1    
)
endlocal

:: Create the 2nd .bat for multiprocessing and start multiprocessing
more /e +88 mybat.bat > temp.bat
START "2nd Process mybat2" temp.bat

:start
    for /f "eol=; tokens=* delims==," %%i in (list1) do call :SEARCH %%i
    goto :END
:: 88th line here
    for /f "eol=; tokens=* delims==," %%k in (list2) do call :SEARCH %%k
    goto :END

:search
    setlocal enabledelayedexpansion
    for %%A in (jan feb mar apr mai etc...) DO (
        findstr /m "%%A" "%~f1" > NUL
        if !ERRORLEVEL! == 0 (
            call :theend %~1 %%A
            goto :EOF
        )
    )
    endlocal

「FINDSTR: X:\folder\folder number\begin.txt を開けません」というエラー メッセージが表示
されます。この findstr の問題を解決する方法はありますか?
ありがとう

4

1 に答える 1

2

ファイルの削除に問題がないかどうかを確認するには:

これらの内容でバッチファイルを作成できますか

echo %*
set /p dummy=press return

名前にスペースを含むファイルをドロップして、結果を投稿しますか?

于 2011-11-15T13:49:28.360 に答える