![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 19:12 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Autoexec.bat automatic search function??? |
| Printable Version 1,817 / 10 |
| Floor1 zjrcool | Posted 2004-08-07 00:00 |
| 初级用户 Posts 8 Credits 123 | |
|
I have a question? I want to ask everyone, I'm waiting online.
I want to make a GHOST recovery disc for a friend. The GHOST backup file is placed on the hard drive (the directory is not necessarily fixed), and only the boot information is made on the disc. The specific use of the boot information on the disc: After the disc is booted, we just need to press the Y key on the keyboard to call the GHOST backup file on the hard drive to restore it. But the problem is here. The GHOST backup files of my friends are placed in different locations. Some are placed in the E:\GHOST directory, some are placed in the F:\GHOST directory. Some are placed in other directories.请问Is there any way to add a few statements in autoexec.bat to automatically search for the location of the GHOST backup file. Then start the recovery. Thank you everyone here! |
|
| Floor2 龙王 | Posted 2004-08-12 00:00 |
| 银牌会员 Posts 334 Credits 1,186 | |
|
There are many methods to implement. I also changed such batch files before. I provide an idea. Use choice to set the drive letter, then use dir to locate the location of the ghost backup, then tell the location to the environment variable. The ghost command statement uses variables for the restore operation. One small program lmod.com is used, which can be found by searching in the forum. A good deed is done to the end, and I will upload it to you.
The choice -related statements are omitted. cd\ diir *.gho /s/b|lmod set gho= ghost.exe -sure -rb -clone,mode=pload,src=%gho%:1,dst=1:1 |
|
| Floor3 龙王 | Posted 2004-08-12 00:00 |
| 银牌会员 Posts 334 Credits 1,186 | |
|
Upload failed, you first search for lmod, and then talk about it if you can't find it
|
|
| Floor4 ligong | Posted 2004-10-20 00:00 |
| 初级用户 Posts 6 Credits 131 | |
|
What exactly is lmod?
|
|
| Floor5 chenall | Posted 2004-10-25 00:00 |
| 银牌会员 Posts 469 Credits 1,276 From 福建泉州 | |
|
Isn't using LOCATE.COM okay?
|
|
| Floor6 hujintao | Posted 2006-09-03 10:46 |
| 初级用户 Posts 21 Credits 74 | |
|
If there are more than one .gho files under a partition, the method of Dragon King diir *.gho /s/b|lmod set gho= can only set the first found file, and this may not be the file to be used? How to continue searching?
[ Last edited by hujintao on 2006-9-3 at 10:48 ] |
|
| Floor7 yadmek | Posted 2006-09-03 21:58 |
| 初级用户 Posts 8 Credits 20 | |
|
Reply: The `*.gho above represents finding all GHOST backup files. Why can't you replace * with the specific one you want to find?
|
|
| Floor8 yadmek | Posted 2006-09-03 21:58 |
| 初级用户 Posts 8 Credits 20 | |
|
Is it "diir"? Did you type one extra "i"?
|
|
| Floor9 yadmek | Posted 2006-09-03 22:00 |
| 初级用户 Posts 8 Credits 20 | |
|
And that dir cannot search the entire disk. Oh, you also need to type c: d: e: f: and so on...
|
|
| Floor10 hujintao | Posted 2006-09-05 04:10 |
| 初级用户 Posts 21 Credits 74 | |
|
Then how to continue searching to find the GHO file you want
|
|
| Floor11 chujiafu | Posted 2006-09-08 06:15 |
| 银牌会员 Posts 595 Credits 1,339 From 安徽 宿州 | |
|
Can we first set a variable: first let's choose the drive letter where the .Gho file is located, then use Dir x:\*.gho/s/a to search. After finding it, then use Ghost to automatically restore.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |