Please look at an example.
The content of autoexec.bat is as follows: The part after ">>" are the annotations I added now.
===================
@echo off >> This is a command to turn off echo. @ means that this command itself will not be displayed.
SET DIRCMD=/OGN /4 >> This is to set the default way of the DIR command
>> The /OGN parameter means to display in the order of group directories and names
>> The /4 parameter means to represent the year with 4-digit numbers.
set ramd=z >> This is to set a variable ramd, which is used to represent the virtual disk
set cdrom=x >> This is to set a variable cdrom, which is used to represent the CD drive
xmsdsk 8192 %ramd%: /y /t >> This is a command to set the virtual disk. 8192 means the size of the disk is 8M
>> % ramd%: is to specify the drive letter of the virtual disk as ramd. Combined with the above
>> ramd=z, that is, specify the drive letter as drive Z. /Y is to confirm this operation
>> /t means to load to the top of XMS
mkdir %ramd%:\temp >> Create a directory temp on the virtual disk
set tmp=%ramd%:\temp >> Set a variable tmp
set temp=%ramd%:\temp >> Set a variable temp
copy a:\command.com %ramd%:\ >nul >> Copy the command.com file from drive A to the virtual disk,
>> >NUL means that the screen information of this command is input to the NUL this
>> special device, this is an empty device. So it is
>> To make this command not echo.
set comspec=%ramd%:\command.com>> Set a variable comspec, the function is to specify >> The location of the command interpreter command.com.
mkdir %ramd%:\bin >> Create a directory bin on the virtual disk
mkdir %ramd%:\doscmd >> Create a directory doscmd on the virtual disk
set ebddir=%ramd%:\doscmd >> Set a variable edddir, the function is to specify the directory of ebd files
set path=%ramd%:\bin >> Set a variable path, the function is to specify the path
copy a:\help.exe %ramd%:\bin >nul >> Copy the help.exe file from drive A to the virtual disk without echoing
>> To the bin directory.
lh mscdex /D:MSCD001 /L:%CDROM% >> Load the CD drive driver, lh is loaded into the high memory,
>> /D:MSCD001, parameter D is the device name, this device name
>> is MSCD001, which should be consistent with the name in your config.sys
copy a:\extract.exe %ramd%:\bin >nul >> Copy the extract.exe file from drive A to the virtual disk without echoing
>> To the bin directory of the virtual disk
echo Extracting device driver(s)... >> Display a message "Extracting device driver(s)..."
>> Meaning is "Extracting device driver(s)..."
mkdir %ramd%:\device >> Create a directory device on the virtual disk
extract /y /l %ramd%:\device /e a:\scsi.cab >nul>> Extract the scsi.cab compressed package from drive A to the virtual disk without echoing
>> The /Y parameter means
>> Confirm this operation, the /L parameter means to extract the file to
>> The specified directory. Here is the device directory.
%ramd%:\device\device %ramd%:\device\btdosm.sys >> This is a command to load various drivers
%ramd%:\device\device %ramd%:\device\flashpt.sys
%ramd%:\device\device %ramd%:\device\btcdrom.sys /D:MSCD001
%ramd%:\device\device %ramd%:\device\aspi2dos.sys
%ramd%:\device\device %ramd%:\device\aspi8dos.sys
%ramd%:\device\device %ramd%:\device\aspi4dos.sys
%ramd%:\device\device %ramd%:\device\aspi8u2.sys
%ramd%:\device\device %ramd%:\device\aspicd.sys /D:MSCD001
extract /y /l %ramd%:\bin /e a:\menu.cab >nul >> Extract the menui.cab compressed package from drive A to the virtual disk without echoing
>>
extract /y /l %ramd%:\doscmd /e a:\ebd.cab >nul >> Extract the ebd.cab compressed package from drive A to the virtual disk without echoing
>>
set path=%path%;%ramd%:\doscmd >> Set a variable path, that is, set the path
>> Separate multiple paths with ;, the meaning of path=%path% is
>> To make the current path variable (path) be
>> The original path, (; followed by the newly added path)
>> The whole meaning is to set the new path as the old path plus the new
>> Added path
LH CTMOUSE >NUL >> Load the mouse driver into the high memory without echoing
lh smartdrv >NUL >> Load smartdrv into the high memory without echoing
>> smartdrv is a disk cache driver
ECHO. >> echo followed by a. means to display an empty line
echo To view Help, type HELP and then press ENTER.>> Display a message
>> Meaning is "If you want to view help, please type Help and press Enter"
echo. >> echo followed by a. means to display an empty line
======================
The file content is complete.
I don't know if this explanation is okay for you? :-)