Examples  - Using Command Lines

Double Image can be run...

 

The executable command can also be followed with additional command variables. The variables can call for an Open a profile, perform a Backup or perform a Restore.  Additional variables may be used to further define the task to be performed.

A command line may reference a backup profile, for example, and then override options in the profile or add to the profiles settings.  A combination of both a profile and a command line with variables permits users to create template profiles, then run scripts that contain environment variables to define the source, target and any other options.

REM  ---------------------------------------------------

REM  Double Image executable, profile, source and target

REM  ---------------------------------------------------

set DI_Executable=C:\Program Files\Double Image Systems\Double Image-O\Double Image-O.exe

set DI_ProfileName=C:\Double_Image_Profiles_Scripts\Profiles\DailyBackupTemplate.bu

set SourceDrive=%SystemDrive%

set TargetDrive=\\ghostcomputer

set TargetFolder=Backup\%USERNAME%\%DAY%"

 

"%DI_Executable%" -b "%DI_ProfileName%" -s:"%SourceDrive%\*.*" -d:"%TargetDrive%\%TargetFolder%\"

 

t command lines with options;  by using one or more profiles and command lines with options

Getting Started

One way to get started is to first create a Double Image profile, set the options to your liking. You may or may not want to select Source and Target folders and files, depending on whether the command lines will define the Source and Target or not.

Next, you can mouse the Schedule Icon, then Add Profile to Schedule. This creates an entire command line with the proper paths and quote marks.  You can use this as a guide for each command line you wish to place in your application calls or scripts.  Since you may not want the Scheduler entry mentioned above, simply delete the entry once you have done a Copy and Paste to your script or application.

Execute Double Image, open a profile, begin a backup

<"Double Image program path"> -b "<Profile file path\filename>" <option_1> <option_2>...

 

Source Variable
-s+:"\\XP_Machine01\C$\Documents and Settings\Linda Smith\*.*"

-s+:"\\XP_Machine01\C$\Documents and Settings\Art Webber\*.*"

 

Target Variable
-d:"\\Win7_Machine01\UsersLinda Smith\

-d:"\\Win7_Machine01\D\Users\Art Webber\

 

<command>.BAT file running Double Image and referencing profiles and additional command line variables

This example contains 2 command entries referencing a single Double Image profile and one (.BAT) file. The 2 entries run 2 unique copy sessions. Hundreds or more entries could exist in a single .BAT file.

"C:\Program Files\Double Image Systems\Double Image\Double Image.exe" -b "C:\Documents and Settings\Joe Admin\My Documents\DOUBLE IMAGE\Profiles\NT Migration to XP.bu" -s+:"\\XP_Machine01\C\Documents and Settings\Linda Smith\*.*"  -d:"\\Win7_Machine01\Users\Linda Smith\

"C:\Program Files\Double Image Systems\Double Image\Double Image.exe" -b "C:\Documents and Settings\Joe Admin\My Documents\DOUBLE IMAGE\Profiles\NT Migration to XP.bu"  -s+:"\\XP_Machine01\C$\Documents and Settings\Art Webber\*.*" -d:"\\Win7_Machine01\D\Users\Art Webber\

 

Related Topics