mirror of
https://github.com/modmii/modmii.github.io.git
synced 2024-12-24 23:21:55 +01:00
Update MultiDrop.bat
This commit is contained in:
parent
49f73eb3d6
commit
232cc96016
@ -1,56 +1,47 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal enabledelayedexpansion
|
||||||
title ModMii MultiDrop
|
title ModMii MultiDrop
|
||||||
::chdir /d "%~dp0"
|
|
||||||
pushd "%~dp0"
|
pushd "%~dp0"
|
||||||
|
cd ..\..
|
||||||
|
if not exist ModMii.exe (
|
||||||
|
echo Error: ModMii.exe not found.
|
||||||
|
goto :exit
|
||||||
|
)
|
||||||
|
if not exist temp\MultiDrop.txt (
|
||||||
|
echo Error: temp\MultiDrop.txt not found.
|
||||||
|
goto :exit
|
||||||
|
)
|
||||||
|
|
||||||
cls
|
cls
|
||||||
cd ../..
|
|
||||||
if not exist ModMii.exe exit
|
|
||||||
if not exist temp\MultiDrop.txt exit
|
|
||||||
support\sfk echo [Red]ModMii MultiDrop
|
support\sfk echo [Red]ModMii MultiDrop
|
||||||
echo.
|
echo.
|
||||||
echo To interrupt sending dropped files to ModMii, close this window.
|
echo To interrupt sending dropped files to ModMii, close this window.
|
||||||
echo.
|
echo.
|
||||||
echo If you manually close ModMii but want to continue sending dropped files, enter N when asked to terminate batch job
|
echo If you manually close ModMii but want to continue sending dropped files, enter N when asked to terminate batch job
|
||||||
echo.
|
echo.
|
||||||
::for /f %%a in (temp\MultiDrop.txt) do (set /a TotalItems+=1)
|
|
||||||
|
|
||||||
support\sfk echo [Blue]MultiDrop Queue
|
support\sfk echo [Blue]MultiDrop Queue
|
||||||
::Loop through the the following once for EACH line in *.txt, but respecting & ^ using !!
|
|
||||||
setlocal ENABLEDELAYEDEXPANSION
|
|
||||||
set /a TotalItems=0
|
set /a TotalItems=0
|
||||||
for /F "tokens=*" %%A in (temp\MultiDrop.txt) do call :process "%%A"
|
for /F "usebackq delims=" %%A in ("temp\MultiDrop.txt") do (
|
||||||
goto:skip
|
set "command=%%~A"
|
||||||
:process
|
set /a TotalItems+=1
|
||||||
set command=%*
|
echo !TotalItems!: "!command!"
|
||||||
set "command=!command:^^=^!"
|
)
|
||||||
set "command=!command:~1,-1!"
|
|
||||||
set /a TotalItems=%TotalItems%+1
|
|
||||||
echo %TotalItems%: "!command!"
|
|
||||||
goto:EOF
|
|
||||||
:skip
|
|
||||||
::setlocal DISABLEDELAYEDEXPANSION
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
support\sfk echo [Blue]Sending ModMii Commands
|
support\sfk echo [Blue]Sending ModMii Commands
|
||||||
|
|
||||||
::Loop through the the following once for EACH line in *.txt, but respecting & ^ using !!
|
|
||||||
::setlocal ENABLEDELAYEDEXPANSION
|
|
||||||
set /a Item=0
|
set /a Item=0
|
||||||
for /F "tokens=*" %%A in (temp\MultiDrop.txt) do call :processMultilist "%%A"
|
for /F "usebackq delims=" %%A in ("temp\MultiDrop.txt") do (
|
||||||
goto:quickskip
|
set "command=%%~A"
|
||||||
:processMultilist
|
set /a Item+=1
|
||||||
set command=%*
|
echo !Item! of !TotalItems!: "!command!"
|
||||||
set "command=!command:^^=^!"
|
start /WAIT ModMii.exe "!command!"
|
||||||
set "command=!command:~1,-1!"
|
)
|
||||||
set /a Item=%Item%+1
|
|
||||||
echo %Item% of %TotalItems%: "!command!"
|
|
||||||
start /WAIT ModMii.exe "!command!"
|
|
||||||
goto:EOF
|
|
||||||
:quickskip
|
|
||||||
::setlocal DISABLEDELAYEDEXPANSION
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
support\sfk echo [Green]Finished, press any key to exit
|
support\sfk echo [Green]Finished, press any key to exit
|
||||||
pause>nul
|
pause>nul
|
||||||
exit
|
|
||||||
|
:exit
|
||||||
|
exit /b
|
||||||
|
Loading…
Reference in New Issue
Block a user