![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-19 10:47 |
共 47,814 主题排行 / 349,908 发帖 / 今日 0 篇 / 48,259 会员排行 |
| DOS疑难解答 & 问题讨论 (解答室) » 遍厉所有分区下GHO文件并还原 |
| 可打印版本 1,280 / 6 |
| 第1楼 haiou327 | 发表于 2007-11-24 01:52 |
| 高级用户 发帖 348 积分 713 | |
|
遍厉所有分区下GHO文件并还原 遍厉所有分区下GHO文件并还原的批处理.
要能支持畸形目录..\之类的. |
|
| 第2楼 haiou327 | 发表于 2007-11-26 19:44 |
| 高级用户 发帖 348 积分 713 | |
|
无语~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
| 第3楼 fastslz | 发表于 2007-11-26 21:53 |
| 铂金会员 发帖 2,315 积分 5,493 来自 上海 | |
|
楼主说的是纯DOS下遍历吧,说白了纯DOS下这种技术一般没人帮的。你可以参考其他一键ghost类的工具代码。
|
|
| 第4楼 xiaoyunwang | 发表于 2007-11-28 23:52 |
| 高级用户 发帖 374 积分 940 来自 湖南张家界 | |
|
我来回复吧 @echo off
if %1#==?# goto usage if %1#==/?# goto usage if %1#==-?# goto usage if %1#==/h# goto usage if %1#==/H# goto usage if %1#==/help# goto usage if %1#==/HELP# goto usage for %%a in (h H -H -h help HELP -help -HELP) do if %%a#==%1# goto usage if not %1#==# goto begin echo 此处添加视窗操作界面,略过!自己加,我用的是字典文件! :begin set searchfolder= set object= set object=%1 for %%a in (r R) do if %2#==-%%a# set searchfolder=Yes for %%a in (folder result search) do if exist %temp%\%%a.txt del %temp%\%%a.txt echo 搜索范围:所有存在驱动器的根目录和一级目录>%temp%\search.txt echo 搜索对象:%1>>%temp%\search.txt echo 搜索路径:>>%temp%\search.txt echo.>>%temp%\search.txt echo.>>%temp%\search.txt echo.>>%temp%\search.txt wbat fill23,10(1,62)(white on +black) " " wbat fill24,10(1,62)(white on +black) " " wbat fill16,10(7,62)(white on +black) " " !text17,10@%temp%\search.txt wbat text21,16(1,50)(+white on black) "[ ]" func -a6 >%temp%\drv.txt strings linage=linesize %temp%\drv.txt strings drv=read %temp%\drv.txt,1 if %drv%#==# goto end strings linage=add %linage%,1 set number=0 :cycle if %number%#==%linage%# goto next strings number=add %number%,1 strings drv=read %temp%\drv.txt,%number% if %drv%#==# goto cycle dready %drv%: /w |if errorlevel 2 goto cycle echo %drv%:>>%temp%\folder.txt if %searchfolder%#==# goto cycle dir "%drv%:" /ad/b>%temp%\path.txt strings linepath=read %temp%\path.txt,1 if %linepath%#==# goto cycle strings linepath=linesize %temp%\path.txt strings linepath=add %linepath%,1 set pathnum=0 :pcycle if %pathnum%#==%linepath%# goto cycle strings pathnum=add %pathnum%,1 strings folder=read %temp%\path.txt,%pathnum% if %folder%#==# goto pcycle echo %drv%:\%folder%>>%temp%\folder.txt goto pcycle :next for %%a in (searchfolder linage drv number linepath pathnum folder) do set %%a= strings linage=linesize %temp%\folder.txt strings linage=add %linage%,1 calc387 49 / %linage%>%temp%\norm.txt strings norm=read %temp%\norm.txt,1 set guage=1 set number=0 :search if %number%#==%linage%# goto end strings number=add %number%,1 strings location=read %temp%\folder.txt,%number% if %location%#==# goto search dir "%location%\%object%" /a/b >%temp%\file.txt strings filenum=read %temp%\file.txt,1 if %filenum%#==# goto guage strings filenum=linesize %temp%\file.txt strings filenum=add %filenum%,1 set num=0 echo :search "搜索结果列表" [x] >%temp%\result.txt :file if %num%#==%filenum%# goto guage strings num=add %num%,1 strings file=read %temp%\file.txt,%num% if %file%#==# goto file set wz=0 set filesize= set filedate= strings filesize=filesize %location%\%file%|if errorlevel 1 goto result strings filedate=filedate %location%\%file%>nul strings filesize=div %filesize%,1024 if %filesize%#==0# set filesize=1 strings length=length %filesize% set div=%filesize% :div strings div=div %div%,1024 if not %div%#==0# strings wz=add %wz%,1 if not %div%#==0# goto div strings wz=add %length%,%wz% strings wz=sub 38,%wz% strings filesize=addcommas %filesize% set filesize=%filesize%KB :result set name=%location%\%file% if not %wz%#==0# strings name=left %name%,%wz% echo %name% %filesize% %filedate%>>%temp%\result.txt wbat fill23,10(1,62)(white on +black) " " !text23,15 "%name% %filesize% %filedate%" goto file :guage calc387 %guage% + %norm%>%temp%\norm.txt strings guage=read %temp%\norm.txt,1 strings _dot=filename %guage% calc387 %guage% * 2 - 1>%temp%\norm.txt strings percent=read %temp%\norm.txt,1 strings percent=filename %percent% wbat fill19,26(1,40)(white on +black) " " !text19,26(1,40) "%location%" wbat fill21,16(1,%_dot%)(white on blue) !text21,39(1,2) "%percent%%%" goto search :end wbat fill21,16(1,50)(white on blue) !text21,39(1,2) "100%%" for %%a in (gho GHO iso ISO) do if %1#==*.%%a# if exist %temp%\result.txt copy %temp%\result.txt %temp%\%%a.ini /y >nul for %%a in (drv folder path file norm) do if exist %temp%\%%a.txt del %temp%\%%a.txt for %%a in (menu me) do if exist %temp%\%%a.bak del %temp%\%%a.bak for %%a in (linage norm guage number location num file filenum object _dot percent filesize filedate wz length div name) do set %%a= goto exit :usage wbat pal ! cls ! text 24,4 @%ramd%\dic.txt:copyright echo. echo ======================= 智能 %0 搜索引擎 ========================== echo. echo %0 [要搜索的文件名] [-r] echo. echo 不使用参数 -r 将搜索所有驱动器的根目录 echo 使用参数 -r 将搜索所有驱动器的根目录和一级目录 echo. echo 实例: echo %0 *.gho -r 搜索所有驱动器根目录和一级目录的扩展名为.gho的镜像文件 echo %0 *iso* -r 搜索所有驱动器根目录和一级目录的包含关键字为iso的文件 echo 注意通配符 ? 代表任一个字符 , 而 * 代表任多个字符组成的字符串 echo. echo 以上所有的搜索结果都保存到 %ramd%\temp\result.txt 文件中供调用 echo. echo --------------- 制作:王小云 结合深度技术论坛(bbs.deepin.org)稍加修改 :exit |
|
| 第5楼 jh1688 | 发表于 2008-08-08 05:08 |
| 中级用户 发帖 126 积分 248 | |
|
set drv=C D E F G H I J K
for %%i in (%drv%) do dir /a-d /b /s %%i:\*.gho >nul >>temp.txt find /i ".gho" temp.txt >nul type temp.txt | lmod set lastdrv=[] >> temp.bat call temp.bat >nul Ghost -clone,mode=pload,src=%lastdrv%:1,dst=1:1 -sure -fx |
|
| 第6楼 lianjiang2004 | 发表于 2008-08-08 16:34 |
| 金牌会员 发帖 1,884 积分 3,946 | |
|
同意3楼的,估计没谁会来重写一个完整的,那样子,不等于一键就完成了?呵呵。
只有找现成的看看。 |
|
| 第7楼 liumingqing | 发表于 2008-08-08 17:27 |
| 初级用户 发帖 73 积分 136 | |
|
正需要這方面的資料呢!謝謝4樓5樓的朋友,借我參考一下.
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |