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-10 06:57
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Closed]. How to make a batch processing for GHOST recovery after renaming .gho? View 2,318 Replies 26
Floor 16 Posted 2008-10-22 20:13 ·  中国 江西 联通
初级用户
Credits 41
Posts 32
Joined 2008-10-16 00:11
17-year member
UID 128490
Gender Male
Status Offline
So it turns out that way. I said why it can also be used.

After trying several writing methods, I found that the most crucial secret is actually adding :1 after the image file.

I also added it before..555555555


:1 means the first partition image

Friends who have the same problem as me should remember it.

^ ^
Floor 17 Posted 2008-10-25 11:29 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Ghost does not identify backup files by file extensions
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 18 Posted 2008-10-25 16:46 ·  中国 上海 虹口区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
Originally posted by everest79 at 2008-10-25 11:29 AM:
Ghost does not identify backup files by file extensions


Agree!!!!! I have been using the method of changing GHO to other extensions for a long time
Floor 19 Posted 2008-10-25 18:27 ·  中国 福建 三明 电信
高级用户
★★
论坛上抢劫的
Credits 551
Posts 246
Joined 2006-09-21 12:35
19-year member
UID 63270
Status Offline
Originally posted by everest79 at 2008-10-25 11:29:
Ghost does not identify backup files by file extension

Sweat, I heard it for the first time!
Floor 20 Posted 2008-10-25 19:59 ·  中国 上海 虹口区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
Originally posted by lotus516 at 2008-10-20 06:27 PM:

Sweat, I heard for the first time!


No need to sweat!!! You can try it yourself:
GHOST -clone,mode=pdump,src=%actp%,dst=%lastp%\~1\winxpsp2.bf -z2 -sure -fx

src=
dst=
Floor 21 Posted 2008-10-25 20:34 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Change .gho to .bak
Should directly call .bak
简单!简单!再简单!
Floor 22 Posted 2008-10-26 01:26 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Ghost only strictly requires file extensions for 32-bit environment applications
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 23 Posted 2008-10-26 08:58 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by everest79 at 2008-10-26 01:26:
ghost has strict requirements for file extensions only for 32-bit applications

For 32-bit, there are also no restrictions on file extensions.

Whether it's ghost or ghost32, when it comes to batch processing, it's all the same. No difference.
Windows 一键还原
http://www.yjhy.com
Floor 24 Posted 2008-10-29 20:57 ·  中国 江西 联通
初级用户
Credits 41
Posts 32
Joined 2008-10-16 00:11
17-year member
UID 128490
Gender Male
Status Offline
Same as above. As long as the path is correct, everything is fine.
Floor 25 Posted 2008-10-30 17:41 ·  中国 山西 运城 移动
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
In short, the LZ only needs to replace d:\ with serial numbers like 1:2, 1:3, or 1:4, etc. Such a simple batch processing is only limited to your own knowledge of the absolute address of the GHO file. Broadly speaking, it is not universal. No matter what suffix you mark for GHOST, just add the ghost file name.* during restoration. But another problem arises: this ghost file must be the unique file name in the computer.
房东说:这娃是个好孩子!
Floor 26 Posted 2008-11-02 11:03 ·  中国 江西 九江 电信
初级用户
Credits 41
Posts 32
Joined 2008-10-16 00:11
17-year member
UID 128490
Gender Male
Status Offline
Originally posted by maya0su at 2008-10-30 17:41:
In short, the original poster only needs to replace d:\ with numbers like 1:2, 1:3, or 1:4, etc.
Such a simple batch processing is only limited to you knowing the absolute address of the GHO file yourself.
It is not universal in a broad sense.
GHOST...


First back up and then restore.

The path can of course be absolute.



Transferred from the forum zsx.

I didn't modify it. This is an idea.


If you want to make a batch processing with search, the following code is needed

COPY %CDROM%:\GHOST.EXE %RAMDRIVE%>NUL
smartdrv /q
SET Drv=C D E F G H I J K L M N O P Q R S T U V W X Y Z
FOR %%I IN (%Drv%) DO DIR %%I:\*.gho /b /s /a >>%RAMDRIVE%\ghost.txt
find /i ".gho" %RAMDRIVE%\ghost.txt
if errorlevel 1 goto a
if not errorlevel 1 goto b
:a
cls
ACIOS
echo.
echo.
echo.
echo No backup file was found in your disk. Now restore the backup file from the CD.
goto gh
:b
type %RAMDRIVE%\ghost.txt|nset ghos=$1
%RAMDRIVE%\Ghost -clone,mode=pload,src=%ghos%:1,dst=1:1 -sure -fx
GOTO END
:gh
%RAMDRIVE%\Ghost -clone,mode=pload,src=%cdrom%:\xp.gh:1,dst=1:1 -sure -fx
GOTO END

Function: Can automatically find *.GHO files and restore them, which has been tested. If someone needs IMG files, I can upload them.
Floor 27 Posted 2008-11-02 11:04 ·  中国 江西 九江 电信
初级用户
Credits 41
Posts 32
Joined 2008-10-16 00:11
17-year member
UID 128490
Gender Male
Status Offline
Originally posted by maya0su at 2008-10-30 17:41:
In short, the LZ only needs to replace d:\ with serial numbers like 1:2, 1:3, or 1:4, etc.
Such a simple batch processing is only limited to your own knowledge of the absolute address of the GHO file.
Broadly speaking, it is not universal.
GHOST...


First backup and then restore.

The path can of course be absolute.

If you want to bring automatic search, the following is it.

Transferred from the forum zsx

I didn't modify it. This is an idea.


If you want to make a batch processing with search, the following code is needed

COPY %CDROM%:\GHOST.EXE %RAMDRIVE%>NUL
smartdrv /q
SET Drv=C D E F G H I J K L M N O P Q R S T U V W X Y Z
FOR %%I IN (%Drv%) DO DIR %%I:\*.gho /b /s /a >>%RAMDRIVE%\ghost.txt
find /i ".gho" %RAMDRIVE%\ghost.txt
if errorlevel 1 goto a
if not errorlevel 1 goto b
:a
cls
ACIOS
echo.
echo.
echo.
echo No backup file found in your disk, now restore the backup file from the CD.
goto gh
:b
type %RAMDRIVE%\ghost.txt|nset ghos=$1
%RAMDRIVE%\Ghost -clone,mode=pload,src=%ghos%:1,dst=1:1 -sure -fx
GOTO END
:gh
%RAMDRIVE%\Ghost -clone,mode=pload,src=%cdrom%:\xp.gh:1,dst=1:1 -sure -fx
GOTO END

Function: Can automatically find *.GHO files and restore, has been tested. If someone needs IMG files, I can upload.


[ Last edited by kookycy on 2008-11-2 at 11:05 ]
Forum Jump: