Tech Support banner
Status
Not open for further replies.
1 - 10 of 10 Posts

·
Registered
Joined
·
11 Posts
Discussion Starter · #1 ·
I working on project to make recovery DVDs using Ghost Image. And i want to use the command line for Multiple ghost images (which ever is available on DVD); example, if i am imaging for D600 and the image name is D600.GHO and on the other hand if i want imaging for nc6000 and the image name is nc6000.GHO, i don't want to change the name of the file every time in bat file and burn the DVD everytime. one command line which will work as whatever Ghost image is available it will load and start imagingon Hard disk.

The command line i am using in BAT file is:

R:\ghost -clone,mode=load,src=R:\NC6000.GHO,dst=1, -afile=C:\ghststat.txt -sure -FX

If someone could help me to use right syntax to use multiple images.

Regards,

Asan
 

·
Microsoft MVP
Joined
·
3,339 Posts
Welcome to TSF!

Is there just one .GHO file on the DVD?
What version of DOS does the DVD boot to? MS-DOS, PC-DOS, or something else?
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #3 ·
On DVD there is one file but i have more than 70 files and more to come.

i m burning DVD frm 98 bootable floppy.


Welcome to TSF!

Is there just one .GHO file on the DVD?
What version of DOS does the DVD boot to? MS-DOS, PC-DOS, or something else?
 

·
Microsoft MVP
Joined
·
3,339 Posts
This should work then.
As long as the .bat file, the ghost.exe file, and the .gho image are in the same folder, the R: drive letter doesn't need to be specified.
Code:
For %%I In (*.gho) Do ghost -clone,mode=load,src=%%I,dst=1, -afile=C:\ghststat.txt -sure -FX
Or if you want to specify the letter:
Code:
For %%I In (R:\*.gho) Do R:\ghost -clone,mode=load,src=%%I,dst=1, -afile=C:\ghststat.txt -sure -FX
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #5 ·
I tried this:
@echo off
R:\ghost -clone,mode=load,src=%%I,dst=1, -afile=C:\ghststat.txt -sure -FX

echo Remove the DVD and restart the computer.


but error even i tried with:

@echo off
R:\ghost -clone,mode=load,src=%I.GHO,dst=1, -afile=C:\ghststat.txt -sure -FX

echo Remove the DVD and restart the computer.


but error
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #6 ·
Moreover i wana share what i tried and succeeded but its not working with other image.

I am using windows 98 bootable floppy to make the DVD bootable. As DOS can only read upto 8 characters e.g. 12345678.txt and DOS read it: 123456~1.txt
I've to name file 1st 6 letters generic for all images and last we can identify them by their model no. e.g: ghostimage-nc6400.GHO and we have to write in Bat file like: ghosti~1.GHO in DOS it is reading like this but Symantec read the file like GHO_0002.GHO.
SO the syntax in Bat file is: GHO_0002.GHO and it worked fine without any errors.

but when i burn image for 6910p and i named it ghostimage-6910p.GHO then Symantec gave it the name 3 rather 2 i.e.: GHO_0003.GHO.

If you think we can add some IF options here like " if GHO_0001.GHO is not available then goto GHO_0002.GHO and if GHO_000.GHO2 in not available then goto GHO_0003.GHO upto 10 or 15.

i m also trying to find a solution that you gave and it seems to be short but if it works.

Let me knw ur feedback.
 

·
Microsoft MVP
Joined
·
3,339 Posts
You left out the For loop, the first part of the line:
For %%I In (R:\*.gho) Do <command>

The For loop will find all files with a .gho extension, sets the loop variable (%%I) equal to the file name, then executes the ghost command (the Do part), replacing %%I with the file name(s) it finds. If there is more than one .gho file, it will repeat the ghost command for each one. It doesn't matter what the filename is.

A Win98 boot disk supports long file names, as it's using MS-DOS 7, but the For command will use the short 8.3 format name if there is one.

So you should have this:
Code:
@echo off
[COLOR=Red]For %%I In (R:\*.gho) Do[/COLOR] R:\ghost -clone,mode=load,src=%%I,dst=1, -afile=C:\ghststat.txt -sure -FX

echo Remove the DVD and restart the computer.
You can see how it works like this:
Create a test folder C:\TestFor, put in 2 or three text files, they can be empty.
Put this in a batch file and save it in that folder.
Code:
@Echo Off
For %%A In (C:\ForTest\*.txt) do Echo %%A
Open a DOS prompt and run the file.
You don't need to specify the path, it will look in the same folder as the batch file, but the name won't include the path:
Code:
@Echo Off
For %%A In (*.txt) do Echo %%A
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #8 ·
You are Genius .... in my native language we called talent like you "Cheeta"
this loop thing works .....
if u don mind then can i ask for 1 more solution that is also related to this project, which is:
M using Roxio for burning bootable DVD for imaging and as mentioned i m using floppy (which contain all files including bat) i want to save ISO image of this Bootable floppy so everytime i burn recovery DVD i dont have to attach floppy and i will browse the ISO image and include New ghost image and thats it ....

if you could help me in this regard my project is completed.
 

·
Microsoft MVP
Joined
·
3,339 Posts
I'm not familiar with Roxio, but there should be a way to save the Floppy image to a file for use with other projects, or even save the settings as a project file you can load.
I use ImgBurn myself.
I choose Burn Files to Disk, Advanced, Bootable, then select the Floppy Drive and save the image, say as BootImg.ima.
Make any other settings like speed, comments, Disk Label, then save the project.
Next disk to be burned, just double click that project file, and it starts the Img Burn program, and all you have to do is add the gho file, change the label if desired, and burn, everything else will be set.

Roxio should have the same capability to save your settings as a project you can reuse.
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #10 ·
I will try ImgBurn but currently i download MagicISO and i make image from floppy and save it in a folder (this is one time job and its done !) and in roxio i open project as bootable DVD and browse for bootable image and right now it is burning DVD, i will update if this will work.
Thanx alot for you help ..
By the way .. change ur nick to Cheeta
 
1 - 10 of 10 Posts
Status
Not open for further replies.
Top