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-22 20:15
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Help----How to make a batch script that lets Ghost back up the image to the last partition View 6,549 Replies 28
Original Poster Posted 2007-01-18 04:52 ·  中国 新疆 喀什地区 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-08 04:24
19-year member
UID 75790
Gender Male
Status Offline
I'm a newbie and don't know how to write? Which kind-hearted expert can help me ah!!!
Floor 2 Posted 2007-01-18 05:04 ·  中国 江西 赣州 电信
高级用户
★★
论坛上抢劫的
Credits 551
Posts 246
Joined 2006-09-21 12:35
19-year member
UID 63270
Status Offline
Floor 3 Posted 2007-01-18 05:21 ·  中国 新疆 喀什地区 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-08 04:24
19-year member
UID 75790
Gender Male
Status Offline
Originally posted by lotus516 at 2007-1-17 04:04 PM:
Why don't you search?

Can't find it, there isn't any?
Floor 4 Posted 2007-01-18 08:43 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
You can also download a one - key Ghost and see how others write it.
Windows 一键还原
http://www.yjhy.com
Floor 5 Posted 2007-01-20 06:30 ·  中国 台湾 桃园市 中华电信
初级用户
Credits 41
Posts 22
Joined 2006-05-25 20:22
20-year member
UID 55996
Status Offline
ghost -clone,mode=pdump,src=1:1,dst=1:*\xxx.gho -sure -fx

...
1:*→The first partition of the first hard disk, for example, the third partition is 1:3, and the fourth partition is 1:4
Floor 6 Posted 2007-01-21 11:00 ·  中国 河北 邯郸 联通
中级用户
★★
Credits 223
Posts 59
Joined 2005-05-23 00:00
21-year member
UID 39002
Gender Male
Status Offline
Make a loop judgment.
Floor 7 Posted 2007-01-22 02:26 ·  中国 江苏 南京 鼓楼区 电信
初级用户
Credits 31
Posts 9
Joined 2007-01-18 22:43
19-year member
UID 76924
Gender Male
Status Offline
ghost -clone,mode=pdump,src=1:1,dst=1:*\xxx.gho -span -z9 -split=680 -sure
Floor 8 Posted 2007-01-22 08:56 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The key is whether this * is for your own computer, a specific number, or a general, non - fixed number. If it's fixed, it's easy. If it's not fixed, then you need to determine it through a batch process and then assign a value.
dst=1:*\xxx.gho
Windows 一键还原
http://www.yjhy.com
Floor 9 Posted 2007-01-22 23:25 ·  中国 新疆 喀什地区 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-08 04:24
19-year member
UID 75790
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2007-1-21 07:56 PM:
The key is whether this * is a specific number of its own machine or a general, non-fixed number.
If it is fixed, it's easy. If it's not fixed, you need to determine and assign it through a batch processing.
dst=1:*\xxx.gho

:PHow to write this batch processing? I just don't know how to write it, can you help me write one? :D
Floor 10 Posted 2007-01-23 00:08 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by yhzlt2008 at 2007-1-22 23:25:

:PHow to write this batch processing? I just don't know how to write it, can you help me write one? :D

You can download my gghost and take a look at the batch processing inside for reference.
Windows 一键还原
http://www.yjhy.com
Floor 11 Posted 2007-01-26 08:28 ·  中国 新疆 喀什地区 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-08 04:24
19-year member
UID 75790
Gender Male
Status Offline
The batch processing in your GGhost upstairs is too complicated. I can't understand it at my current level! Can you give a simpler one?
Floor 12 Posted 2007-01-27 08:36 ·  中国 广东 广州 珠江宽频
中级用户
★★
Credits 210
Posts 85
Joined 2007-01-14 12:38
19-year member
UID 76501
Gender Male
From 广东广州
Status Offline
The key is whether this * is a specific number for one's own machine or a general, non-fixed number.
If it's fixed, it's easy. If not fixed, it needs to be determined and assigned through a batch script.
dst=1:*\xxx.gho


Task: Return the value of *, for example, if the last partition is E, return 3; if it's F, return 4, and so on.

Here is an example using the batch processing enhancement tool FINDCD.EXE, STRINGS.COM (available for download in the forum):

@echo off
set cdrom1=
findcd /s>nul
if not "%cdrom1%"=="" strings last=left %cdrom1%,1,1
if not "%cdrom1%"=="" goto ston
for %%n in (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) do if exist %%n:\nul set last=%%n
:ston
strings last=val %last%
strings last=sub %last%,67
if "%cdrom1%"=="" strings last=add %last%,1
echo %last%
set cdrom=
set cdrom1=
(Test environment: MS-DOS 7.10)
Floor 13 Posted 2007-01-27 09:14 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Can NTFS partitions be handled?
Windows 一键还原
http://www.yjhy.com
Floor 14 Posted 2007-01-27 09:55 ·  中国 广东 广州 珠江宽频
中级用户
★★
Credits 210
Posts 85
Joined 2007-01-14 12:38
19-year member
UID 76501
Gender Male
From 广东广州
Status Offline
Originally posted by lianjiang2004 at 2007-1-26 08:14 PM:

Can NTFS partitions handle this?


NTFS partitions are not supported by DOS, unless third-party drivers such as ntfsdos, ifs, etc. are loaded.
Floor 15 Posted 2007-01-27 10:26 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
After loading, the correspondence between drive letters and partitions also needs to be handled.
Windows 一键还原
http://www.yjhy.com
Forum Jump: