Implement this in the following code: when the free space on drive D of storage server X is less than 10GB, if the user still chooses server X for data storage, the program should first check whether drive D on server X is greater than 10GB. If yes, then continue. Otherwise, give the prompt “Server X disk space is full.” Then after pressing any key, the program should still continue running...
(As long as it achieves the purpose of a prompt!! ~~)
Sample code:
@echo off
color e
:start
cls
set /p ok=Please choose a storage server(1-5):
if %ok% geq 1 (
if %ok% leq 5 (
if exist GameSave%ok% (Start GameSave%ok%\svClient.exe) else (goto wrong)
) else (goto wrong)
) else (goto wrong)
goto :eof
:wrong
echo Server does not exist
echo Press any key to continue
>nul pause
goto start
──────────────── Moderator Record ────────────────
Handled by: namejm
Original title: Help: How can this function be implemented with a batch file??? (Brother lxmxn = that's you)
Explanation: Because the title is too vague, it is inconvenient for forum searching and management. Please modify the title within three days.
Tip: To modify the title, click Edit,at the lower right of the current post. After finishing the modification, press Edit Post .
Penalty: Since you only recently got past the newbie stage, no penalty will be given for now; if it is still not modified after three days, the following will be deducted:
2 credits as a penalty, and the moderator will forcibly modify the title. Please clickhereto read the forum posting rules,
to avoid violating the posting rules in future discussions.
──────────────── Moderator Record ────────────────
[ Last edited by namejm on 2006-11-22 at 05:48 PM ]
(As long as it achieves the purpose of a prompt!! ~~)
Sample code:
@echo off
color e
:start
cls
set /p ok=Please choose a storage server(1-5):
if %ok% geq 1 (
if %ok% leq 5 (
if exist GameSave%ok% (Start GameSave%ok%\svClient.exe) else (goto wrong)
) else (goto wrong)
) else (goto wrong)
goto :eof
:wrong
echo Server does not exist
echo Press any key to continue
>nul pause
goto start
──────────────── Moderator Record ────────────────
Handled by: namejm
Original title: Help: How can this function be implemented with a batch file??? (Brother lxmxn = that's you)
Explanation: Because the title is too vague, it is inconvenient for forum searching and management. Please modify the title within three days.
Tip: To modify the title, click Edit,at the lower right of the current post. After finishing the modification, press Edit Post .
Penalty: Since you only recently got past the newbie stage, no penalty will be given for now; if it is still not modified after three days, the following will be deducted:
2 credits as a penalty, and the moderator will forcibly modify the title. Please clickhereto read the forum posting rules,
to avoid violating the posting rules in future discussions.
──────────────── Moderator Record ────────────────
[ Last edited by namejm on 2006-11-22 at 05:48 PM ]
