|
| 1 | +@echo off |
| 2 | +setlocal enabledelayedexpansion |
| 3 | +title LoaderMDO Copy Utility v1.0 |
| 4 | + |
| 5 | +REM Get the current directory |
| 6 | +set "currentDir=%~dp0" |
| 7 | + |
| 8 | +REM Check if LoaderMDO.exe exists in the current directory |
| 9 | +if not exist "%currentDir%LoaderMDO.exe" ( |
| 10 | + echo LoaderMDO.exe not found in the current directory. |
| 11 | + goto end |
| 12 | +) |
| 13 | + |
| 14 | +echo LoaderMDO.exe found. Checking for DEV7 games... |
| 15 | + |
| 16 | +REM Initialize a counter |
| 17 | +set "counter=0" |
| 18 | +set "drives=C D E F G H I J K L M N O P Q R S T U V W X Y Z" |
| 19 | + |
| 20 | +REM Find all drives and search for directories containing Loader7.exe or Dev7VM.exe |
| 21 | +for %%D in (%drives%) do ( |
| 22 | + if exist %%D:\ ( |
| 23 | + for /d %%F in (%%D:\coktel\*) do ( |
| 24 | + if exist "%%F\Loader7.exe" ( |
| 25 | + set /a counter+=1 |
| 26 | + set "dir!counter!=%%F" |
| 27 | + echo !counter!: %%F |
| 28 | + ) else if exist "%%F\Dev7VM.exe" ( |
| 29 | + set /a counter+=1 |
| 30 | + set "dir!counter!=%%F" |
| 31 | + echo !counter!: %%F |
| 32 | + ) |
| 33 | + ) |
| 34 | + ) |
| 35 | +) |
| 36 | + |
| 37 | +REM Check if any directories with Loader7.exe or Dev7VM.exe were found |
| 38 | +if %counter%==0 ( |
| 39 | + echo No directories were detected which are for DEV7 games. |
| 40 | + goto end |
| 41 | +) |
| 42 | + |
| 43 | +REM Prompt the user to select a directory |
| 44 | +:input |
| 45 | +set /p "choice=Enter the number of the directory where you want to copy LoaderMDO.exe: " |
| 46 | + |
| 47 | +REM Validate the user's choice |
| 48 | +if not defined dir%choice% ( |
| 49 | + echo Invalid choice. Please enter a valid number. |
| 50 | + goto input |
| 51 | +) |
| 52 | + |
| 53 | +REM Set the destination directory |
| 54 | +set "destination=!dir%choice%!" |
| 55 | + |
| 56 | +REM Check if LoaderMDO.exe exists in the destination directory |
| 57 | +if exist "%destination%\LoaderMDO.exe" ( |
| 58 | + echo LoaderMDO.exe already exists in %destination%. |
| 59 | + set /p "overwrite=Do you want to overwrite it? (Y/N): " |
| 60 | + if /I not "!overwrite!"=="Y" ( |
| 61 | + echo Copy operation cancelled. |
| 62 | + goto end |
| 63 | + ) |
| 64 | +) |
| 65 | + |
| 66 | +REM Copy LoaderMDO.exe to the selected directory |
| 67 | +echo Copying LoaderMDO.exe to %destination% |
| 68 | +copy "%currentDir%LoaderMDO.exe" "%destination%\" |
| 69 | + |
| 70 | +echo Copy process completed. |
| 71 | + |
| 72 | +:end |
| 73 | +endlocal |
| 74 | +pause |
0 commit comments