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-07-23 00:52
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Ask how to copy CD files to the last hard disk drive letter under the CD. View 1,783 Replies 8
Original Poster Posted 2009-05-09 22:21 ·  中国 辽宁 沈阳 联通
新手上路
Credits 17
Posts 7
Joined 2009-05-07 22:20
17-year member
UID 144583
Gender Male
Status Offline
I'm a newbie, and I'm asking for help. When booting from a CD, if using DOS, create a folder named win98 in the last drive letter on the hard disk, then copy the files from the win98 folder under the CD directory to the folder you just created, and then execute setup in the win98 folder on the hard disk, or directly copy the win98 directory under the CD to the last hard disk drive letter, and then execute the installation. Thanks to all the experts!
Floor 2 Posted 2009-05-09 22:26 ·  中国 辽宁 沈阳 联通
新手上路
Credits 17
Posts 7
Joined 2009-05-07 22:20
17-year member
UID 144583
Gender Male
Status Offline
Supplementary note: Here, it is necessary to automatically determine the last drive letter of the hard disk and the optical drive letter, because the machine may not necessarily have 3 partitions or 4 partitions, and the format may not all be FAT32.
Floor 3 Posted 2009-05-09 22:50 ·  中国 辽宁 葫芦岛 联通
中级用户
★★
Credits 247
Posts 147
Joined 2009-04-09 20:52
17-year member
UID 142531
Gender Male
Status Offline
The most traditional method, cooperate with the following software to realize:
1. drvtypes list all available local drive letters currently
2. strings operate on text files and strings
3. findcd find out the optical drive letter
4. dready judge whether the disk status is available
5. cooperate with the goto of bat batch processing to make loops and transfers
6. xcopy copy file and folder contents
Floor 4 Posted 2009-05-10 00:20 ·  中国 辽宁 葫芦岛 联通
中级用户
★★
Credits 247
Posts 147
Joined 2009-04-09 20:52
17-year member
UID 142531
Gender Male
Status Offline
The already prepared bat package
http://www.namipan.com/d/40166a9cb234ac81e3b98d73d8a0726286ff760d210a0100

3 bats:
f_cd.bat is responsible for finding the CD - ROM with the win98 folder and assigning the drive letter to the variable cdron
f_hd.bat is responsible for finding the drive letter of the last recognized local writable partition and assigning it to the variable drv
mv.bat copies the contents of the win98 folder in the CD - ROM to the win98 folder in the last partition according to the running results of f_cd.bat and f_hd.bat.

Involved software:
drvtypes lists local disk drive letters
nset accepts command - passed information and sets environment variables
aset sets environment variables and performs numerical operations
findcd finds CD - ROMs
find finds the string in the text block
xcopy copies the folder as a whole
dready judges the disk status
Floor 5 Posted 2009-05-10 04:48 ·  中国 辽宁 沈阳 联通
新手上路
Credits 17
Posts 7
Joined 2009-05-07 22:20
17-year member
UID 144583
Gender Male
Status Offline
I'll give it a try. Thanks!
Floor 6 Posted 2009-05-13 21:06 ·  中国 辽宁 沈阳 联通
新手上路
Credits 17
Posts 7
Joined 2009-05-07 22:20
17-year member
UID 144583
Gender Male
Status Offline
Can these three batch scripts be integrated into one?
Floor 7 Posted 2009-05-13 21:57 ·  中国 广东 电信
新手上路
Credits 2
Posts 1
Joined 2009-05-12 22:06
17-year member
UID 144938
Gender Male
Status Offline
Newcomer reporting, always reply when reading posts
Floor 8 Posted 2009-05-13 23:22 ·  中国 辽宁 葫芦岛 联通
中级用户
★★
Credits 247
Posts 147
Joined 2009-04-09 20:52
17-year member
UID 142531
Gender Male
Status Offline
Originally posted by xxdahai at 2009-5-13 21:06:
Can these three batch files be integrated into one?


It's better to place them separately, modularizing the program segments. If you want to run 3 bats at once, you can edit a unified calling batch.

These 3 batch files each have their own functions, and putting them together involves identifying and arranging their respective error messages. It's relatively more complicated. You can figure it out yourself.

Learning is the most important thing!
Floor 9 Posted 2009-05-13 23:33 ·  中国 辽宁 沈阳 联通
新手上路
Credits 17
Posts 7
Joined 2009-05-07 22:20
17-year member
UID 144583
Gender Male
Status Offline
Learning
Forum Jump: