China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 12:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Who can explain this program? (There are Japanese) View 9,990 Replies 5
Original Poster Posted 2003-05-02 00:00 ·  中国 上海 同济大学学生宿舍
初级用户
Credits 117
Posts 5
Joined 2003-05-01 00:00
23-year member
UID 1792
Gender Male
Status Offline
1, What does %1 mean?
2, What does pause > nul mean?

@echo off
if "%1" == "" goto usage
if "%1" == "ibm5" goto mess
if "%1" == "IBM5" goto mess
if "%1" == "pc6" goto mess
if "%1" == "PC6" goto mess
if "%1" == "ms6" goto mess
if "%1" == "MS6" goto mess
goto mess
:mess
echo 誤用警告
echo 此工具會覆蓋目標磁碟上的作業系統檔案
echo 請在執行前備份相關的CONFIG.SYS和AUTOEXEC.BAT檔案
echo 此工具生成的CONFIG.SYS和AUTOEXEC.BAT檔案可能會導致非標準字體配置的系統出現問題,進而可能導致系統無法正常啟動
echo 請確保在生成配置檔案前已備份原始的CONFIG.SYS和AUTOEXEC.BAT檔案,否則可能會覆蓋原有設定
echo 請注意,生成的配置檔案可能會導致字體顯示異常(需要安裝特定字體支援)
echo 請使用以下命令格式化磁碟:
echo FORMAT A:
echo 此工具會創建必要的系統檔案,生成的系統檔案配置可能需要根據實際硬碟配置調整,請確認後再繼續操作
echo 錯誤使用方式:請使用「格式化磁碟」命令清空磁碟後再重新執行
echo 格式化磁碟後生成的系統檔案可能無法正常啟動,請謹慎操作

sys c:\ a:
if "%1" == "ibm5" goto ibm5
if "%1" == "IBM5" goto ibm5
if "%1" == "pc6" goto pc6
if "%1" == "PC6" goto pc6
rem ms6
copy config.ms6 a:config.sys /v /y > nul
copy autoexec.ms6 a:autoexec.bat /v /y > nul
goto mess1
:ibm5
copy config.pc5 a:config.sys /v > nul
copy autoexec.pc5 a:autoexec.bat /v > nul
copy c:\$jpnhn16.fnt a: /v > nul
copy c:\$jpnhn19.fnt a: /v > nul
copy c:\$jpnzn16.fnt a: /v > nul
goto mess1
:pc6
copy config.pc6 a:config.sys /v /y > nul
copy autoexec.pc6 a:autoexec.bat /v /y > nul
:mess1
echo 系統檔案生成完成
echo 請確認磁碟已格式化並正確插入後,重新啟動電腦
echo 第一次啟動可能需要調整BIOS設定以適配新的系統配置
goto end
:usage
echo 用法說明:MAKEDISK IBM5 ... IBM DOS版本J5.0/V 配置
echo 丂丂丂丂MAKEDISK PC6 ... PC DOS版本J6.x/V 配置
echo 丂丂丂丂MAKEDISK MS6 ... MS DOS版本J6.2/V 配置
echo 錯誤使用方式:請使用「格式化磁碟」命令清空磁碟後再重新執行
echo 格式化磁碟命令:
echo FORMAT A:
echo 請在格式化後再執行本工具以生成系統檔案
:end

Floor 2 Posted 2003-05-02 00:00 ·  中国 上海 同济大学学生宿舍
初级用户
Credits 117
Posts 5
Joined 2003-05-01 00:00
23-year member
UID 1792
Gender Male
Status Offline
Reply to me by email at guyu5043@163.com thanks
Floor 3 Posted 2003-05-02 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
This program means that according to different command - line parameters, it automatically copies the corresponding DOS (such as PC - DOS, MS - DOS) system and configuration files to the A drive to make the boot disk of the corresponding DOS. PAUSE>NUL means to press any key to continue, but no information is displayed on the screen.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2003-05-03 00:00 ·  中国 上海 同济大学学生宿舍
初级用户
Credits 117
Posts 5
Joined 2003-05-01 00:00
23-year member
UID 1792
Gender Male
Status Offline
What is "%1"?
What is "ibm5"?
config.pc6 config.ms6 I've never seen file extensions like this!!!!!
Floor 5 Posted 2003-05-03 00:00 ·  中国 湖北 武汉 江夏区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
%1 is a variable.

ibm5 is a menu item set in the config file, and it can be called anything like "Amao" or "Agou".

config.pc6 and config.ms6 are all renamed files, and they will be changed back after operation.
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 6 Posted 2019-05-04 19:52 ·  中国 吉林 延边朝鲜族自治州 延吉市 联通
初级用户
dos荒废了吗?
Credits 85
Posts 37
Joined 2018-09-22 19:46
7-year member
UID 183109
From 北海道(
Status Offline
@echo off
if "%1" == "" goto usage
if "%1" == "ibm5" goto mess
if "%1" == "IBM5" goto mess
if "%1" == "pc6" goto mess
if "%1" == "PC6" goto mess
if "%1" == "ms6" goto mess
if "%1" == "MS6" goto mess
goto mess
:mess
echo Attention!
echo ・This batch file is for creating a disk for booting with as much free main memory as possible.
echo ・The "CONFIG.SYS" and "AUTOEXEC.BAT" created by this batch file are just sample ones for ordinary desktops and tower PCs. So, some notebook PCs (those with FDD connected via PCMCIA card) etc. may not work, and power-saving drivers are not included, so the power-saving function may not work.
echo  In that case, please add each driver to "CONFIG.SYS" and "AUTOEXEC.BAT" created on the floppy by this batch file.
echo  However, since the added driver may run out of memory, please free up memory as much as possible, such as using UMB as much as possible (refer to the manual attached with DOS for how to use UMB).
echo ・Please prepare one pre-formatted floppy.
echo  The way to format is,
echo  FORMAT A:
echo  This batch file operates with the hard disk as drive C and the floppy drive as drive A. So, if the environment is different, please rewrite the drive specifications in the batch file before running.
echo ・If you want to stop in the middle, press + to stop the execution of the batch file.
echo Please press any key when the prepared formatted floppy is inserted into drive A.

sys c:\ a:
if "%1" == "ibm5" goto ibm5
if "%1" == "IBM5" goto ibm5
if "%1" == "pc6" goto pc6
if "%1" == "PC6" goto pc6
rem ms6
copy config.ms6 a:config.sys /v /y > nul
copy autoexec.ms6 a:autoexec.bat /v /y > nul
goto mess1
:ibm5
copy config.pc5 a:config.sys /v > nul
copy autoexec.pc5 a:autoexec.bat /v > nul
copy c:\$jpnhn16.fnt a: /v > nul
copy c:\$jpnhn19.fnt a: /v > nul
copy c:\$jpnzn16.fnt a: /v > nul
goto mess1
:pc6
copy config.pc6 a:config.sys /v /y > nul
copy autoexec.pc6 a:autoexec.bat /v /y > nul
:mess1
echo The creation of the boot disk has been completed.
echo When playing games, please insert the boot disk and boot DOS.
echo When returning to the previous environment, please remove the boot disk and boot DOS.
goto end
:usage
echo Usage: MAKEDISK IBM5 ... For IBM DOS version J5.0/V
echo    MAKEDISK PC6 ... For PC DOS version J6.x/V
echo    MAKEDISK MS6 ... For MS DOS version J6.2/V
echo    Note: Please prepare one pre-formatted floppy.
echo       The way to format is,
echo       FORMAT A:
echo       (If the floppy is drive A)
:end
Forum Jump: