Examples of usage for the -preserve and the -preserveifexists switches.

Article:TECH109057  |  Created: 2005-01-02  |  Updated: 2013-10-30  |  Article URL http://www.symantec.com/docs/TECH109057
Article Type
Technical Solution



Here are some examples of usage for the -preserve switch. This switch can be used with the Ghost executable.


ghost32 -clone,mode=prestore,src=c:\test.gho:1,dst=1:1 -preserve=1:1\file1.txt (preserves file 1:1\file1.txt to partition 1:1)

ghost32 -clone,mode=prestore,src=c:\test.gho:1,dst=1:1 -preserve=1:1\file1.txt=newfilename.txt (preserves file 1:1\file1.txt, file renamed to 1:1\newfilename.txt)

ghost32 -clone,mode=prestore,src=c:\test.gho:1,dst=1:1 -preserve=1:1\folder (preserves 1:1\folder (and its subfolders & files) to partition 1:1)

ghost32 -clone,mode=prestore,src=c:\test.gho:1,dst=1:1 -preserve=1:1\folder=newfolder (preserves 1:1\folder (and its subfolders & files), folder renamed to 1:1\newfolder)

When using the -preserve switch, if the specified file or folder doesn't exist, Ghost will abort with error message.
The -preserveifexists switch works in the same way as the -preserve switch except that if a file/folder specified doesn't exist, Ghost will just ignore the preserve entry.

Legacy ID


Article URL http://www.symantec.com/docs/TECH109057

Terms of use for this information are found in Legal Notices