Command Line Options Defined

Command Line Options

Administrators and developers can execute Double Image from a single command line containing a set of options. Commands can be issued from other applications or directly from Windows resources such as the Command Window, Desk Top Icons, Shortcuts, Double Image built-in Scheduler or the Windows Task Scheduler.

Instead of using command-line options, administrators and developers can run Double Image as most users do -- by using existing profiles. Profiles are created when Double Image is run and saved with the extension of .bu (as in backup).

Backups and restores can be performed using a combination of profiles, command-line options, and the Double Image Scheduler. Note, restores can not be done to open or in use files.

Command line options can be preceded by a '-' or a '/'. The command line is not case sensitive.

Using Command Lines
Software Developers

Command lines are valuable to developers who want to incorporate a backup and restore capability into their software.

Network Administrators

Using command lines administrators might run Double Image on a remote PC or Server. In this situation, the command-line option 'run invisible' would be useful to avoid disturbing the remote user by preventing the Double Image user interface from appearing on the user's screen.

 

Using a combination of Profiles and Command Line options

Profiles and command-line options can be used independently or in conjunction with one another. For example, consider the following possibilities:

Create a single profile, using the standard Double Image UI.

Using a command line, call a Double Image profile file and modify or add command options. The additional options can either replace or add to the profile options in the profile.

 

Execute Double Image, open a profile, begin a backup

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

 

Execute Double Image, open a profile, begin a restore

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

 

Click to see an example of this use
 

Command Line Attributes (variables) defined
-a:+hs-ao

 

Command Line File Names and Strings

Double Image checks command-line file names and strings for alpha-numeric and valid filename characters.  

If a string or file name has spaces in it, put quotation marks around the file name or string. When in doubt, surround the string, path name or file name with double quotes ( "string" ).

Command Line Dates and Times

Some command-line options can accept a date and time as a parameter.

For these options, the format is:

mm/dd/yy hh:mm:ss or mm/dd/yyyy hh:mm:ss

mm/dd/yy          or mm/dd/yyyy

 

where mm is the month, dd is the day, yy is the year,  hh is the hour on a twenty-four hour clock, mm is the number of minutes, and ss is the number of seconds.  Seconds are optional.

Options

Attributes: Resetting -reset

-reset:ar

This option specifies which file attributes to reset as files are copied.

Switches   

Description

a

Reset archive bit when file is copied

"Reset archive bit" turns off or clears the archive bit for the Source files being copied. This option would normally be used in conjunction with the following option, which also relates to the Archive bit.

The user might use this option to have Double Image function, as most backup programs do, where the Source file Archive bit is depended upon, to do incremental backups.  If the user selects this option then the option Copy only files with archive bit set would normally be used, as well, to enforce the copying of new and modified files from the Source.

r

Reset the read-only attribute as the file is copied

 

Attributes: Select Files Based On Attribute Settings -a

-a:ahos

This command selects or excludes files based on file attributes.

Switches   

Description

a

Include or exclude files with the archive attribute set
Include: Copies only files with archive bit set

Only files that have their Archive attribute set will be copied. This option is usually used in conjunction with Reset archive bit when file is copied to copy only files that have been newly created or modified by the operating system (and therefore also created, modified by other applications).  The user might use this option to have Double Image function, as most backup programs do, where the Source file Archive bit is depended upon, to do incremental backups.  If the user selects this option then the option Reset archive bit when file is copied would normally be used, as well, to mark files on the Source as 'already copied'. Another reason to use this option is to avoid any date-time conforming issues when copying between different Windows platforms or to deal with daylight savings time changes between different machines. This is especially true between FAT, UDF and NTFS file systems.

By default, Double Image does not depend on the Archive bit to determine if files should be copied or not. The default for Double Image depends on the Source to Target comparison of file name, date, time, file size and attribute settings to determine whether or not a file should be copied to the Target.

h

Include or exclude hidden files

o

Include or exclude off-line files

s

Include or exclude system files

Backup, Restore, Open -b, -r, -o

-b:"<profile path\filename>"

-r:"<profile path\filename>"

-o:

 

Option

Switch

Description

Open a profile and start a backup

-b

 <profile path\filename> [option 1] ... [option n]

 

Instructs Double Image to load the profile file and begin a backup.  Only one '-b' is allowed on the command line. Additional command line options must follow the <profile path\filename>.  Each additional command line option can replace or add to the settings loaded from the profile. The profile file itself is not updated by the additional command line options. The file remains as it did when it was opened.

Open a profile and start a restore

-r

<profile path\filename> [option 1] ... [option n]

This command instructs Double Image to load the profile file and begin a restore. Only one of these options is allowed on the command line. The profile is loaded first, and any additional command line options modify the settings loaded from the profile.  The profile file itself is not updated by the additional command line options. The file remains as it did when it was opened.

Open an empty profile

-o

[option 1] ... [option n]

 

This command instructs Double Image to load an empty, unsaved  profile file.  No backup or restore is started. The empty profile can be modified by the additional command line options that follow this o switch.  The modified profile is used throughout the execution, but  is not saved at the end Double Image execution.  Any other command line options may follow, other than the ones in this set i.e.,  b, r, o

 

 Copy Open Files -openfile

 

Switches   

Description

-openfile:on

The default is OFF.

This turns on the ability to copy open files.

Note
: Before this option can be used, the PC must have a version of Double Image-O installed along with the license. If a license is not present, then the user will not see the 'Copy Open Files options' in the options pane of the user interface.

-openfile:off

The default is OFF. The reason for having this command line option, is to provide the ability to override an already defined profile, with regard to copying open files (which all command line options can do).

This is the opposite of the above and turns off the ability for Double Image-O to copy open files. If open files are encountered in the backup, then the log will show event warnings to that effect.

-opencache:<cache file path>

"C:\TempFolder\"

-opencachesize:<cache size MB>

The default is 5% of the capacity used for all active drives to have open files copied. An active drive is described above.

1835 would equal a maximum cache size of 1.835GB. The maximum cache size can be ~7GB.

-openwait:<seconds of quiet>

5 is the default.

This is the number of seconds that each open file needs to be inactive, before Double Image-O will begin the backup and for the cache to be created.

-opentimeout:<time out in  minutes>

30 minutes is the default.

This is the length of time Double Image-O will wait until ALL open files have been acquired and that they have passed the quiet time (time of inactivity).  If this time in minutes is reached, then the backup cannot continue and just does not start. The user is informed in the log and by a warning message (if warnings are turned on).

 

 

Copy Options -ops

-ops:znpauvx

This command option sets the copy options, based on the switches.

Switches   

Description

z

Never Copy Zero Byte Files

When the 'z' switch is used any source file that has a file size of 0 (zero) will not be copied and a Warning entry is entered in the Double Image log. Zero byte files may or may not be valid files. Some applications will create empty (.log) files, for example. On the other hand, zero byte files can result when a task/application either did not complete writing to a file, opened the file for output but could not write to the file, opened the file and an application crash or operating system crash occurred.

During an incremental copy session and if the 'z' switch is used, and the source and target files have the same timestamp, name and attributes then the log is not updated with a warning entry.

n

Never over-write newer files with older files

When checked, files on the Target date/time stamps newer than the Source date/time stamps will not be written on the Target.

r

Never over-write read-only files

If this option is checked, Double Image will not:

  • delete read-only Orphan files on the Target.
    Orphan
    files are those that exist on the Target, but do not exist on the Source. When the option to Delete Files on Target that are not on the Source is selected, then Orphan files are deleted on the Target.

  • This provides synchronizing.

  • over-write read-only files on the Target

When this option is checked, the user is never prompted with a Warning Message related to read-only files on the Target.

a

Copy all files regardless of file dates

Double Image normally will copy only files that need to be copied, thereby saving a lot of time. The criteria for determining if a file should be copied is date, time, size, name, attributes, including compression.  If this option is checked then the tests for any of the criteria is skipped and the file is copied, even when the Target file is exactly the same in all respects.

When this option is selected then all files are copied, with the exception of the options that state NEVER COPY..., NEVER OVER-WRITE, EXCLUDE...

u

Write updated portions of files only

 

When updating a changed file, re-write only the changed portion of the file. This option is slower when writing to disk drives, but faster when writing to certain CD and DVD drives.

v

Verify files as they are copied

 

x

Auto-Exit when the copy is done

 

 

Compression -compression

-compression:on

-compression:off

-compression:ignore

The Compression option sets compression to on, off or ignore for the copy session.

If compression is on, all files are copied compressed.

If compression is off, any existing compressed files are decompressed as they are copied.

If compression is ignore, files are copied as they are, without their compression changed.

When copying from Windows controlled drives a warning message is created if the destination drive does not support compression and the compression option has been turned on.

Switches   

Description

<empty>

Copy files without changing compression on the Target

on

Compress files as they are copied. The Target folders and files are compressed during the copy process.

off

Do not compress files. If files are already compressed, then  decompress files and folders when copied. If the Target files are previously compressed, they will be decompressed during the copy process.

ignore

Ignore compression differences between source and target files and folders. This options is forced on when running the win9x version. Windows Me, Windows 98 and Windows 95 do not handle standard compression.

Dates: From -from

-from:<Date and Time>

 

This option selects files by file modification date. Double Image selects files modified after the date and time specified.

Dates: To -to

-to: <Date and Time>

 

This option selects files by file modification date. Double Image selects files modified before the date and time specified.

Delete Files 'Orphans' On Target -delete

-delete:off
-delete:minor
-delete:major
-delete:excluded

 

Option

Switch

Description

-delete

off

All Delete files on Target options are off

-delete

minor

Minor Delete is set. Delete all orphan files on the target that are relative to the source paths, but lower in the path than the source.

-delete

 

major

Major Delete is set (which includes the operations of Minor Delete, by default).

Delete all orphan files on the target that are equal in relation to the source paths. Use caution - - read further about Major Delete.

-delete

 

excluded

Delete file on Target, skipping deleting sub-folders and  files marked excluded from the copy.

 

File Name Options -name

-name: rpa

The name option controls how Target (Target) file names are formed.

Option

Switches   

Description

-name

r

Relative file names.

-name

p

Relative file names plus the enclosing folder.

-name

a

Absolute file names.

 

Log: How Copy Events Are Logged -log

-log:ascp

The log options control how copy events are logged.

Switches   

Description

a

Log all events

s

Log summary, error and warning events

c

Clear log before copy

p

Automatically name the log file after the profile name, plus the '.bul' (backup log) extension. That is, the profile 'C:\DITest\Backup.bu' will automatically have a log name of 'C:\DITest\Backup.bul' In the UI this is set under the 'Warning, Errors, & Logging' options in the log options.  Also, it can be set globally for all newly created profiles in the program preferences: "Use the name of the profile plus the '.bul' extension" 

 

Log Name -logname

-logname:<Filename>

This option is used to specify the name of the log file.

Log Size -logsize

-logsize:<Size in KB>

This option is used to specify the maximum size of the log file in KB (kilobytes). If the maximum log size is met, then the most recent log entries are retained.

Registry Backup or Restore -reg

-reg:b
-reg:r     
-reg:w     
-reg:-b  
 

This option permits or disallows the backup or restore of the system's registry. A warning can be provided to the operator if the registry is about to be backed up. Why would you use the disallow a registry backup? Answer: If you wanted to override a profiles existing option settings and to ensure that the registry is not backed up.

Switches   

Description

-reg:b

Backup registry

-reg:r

Restore registry

-reg:w

Backup or restore registry if Windows directory is backed up or restored

-reg:-b

Means 'Don't backup the registry'

-warn:r

Warn the user before restoring a registry

 

Report Creation: List, Compare, Type of report -report

-report:list
-report:compare
-report:html | log | text
 

If the -report option is included on the command line, Double Image performs a report instead of copying any files.

 -Switches

Description

-report:list

The list option instructs Double Image to list all source files.

-report:compare

The compare option instructs Double Image to compare all Source and Target files.

-report:html

The 'html' option selects output in html format.

-report:log

The 'log' option selects output in log file format.

-report:text

The 'text' option selects output in text file format.

Report Name Assignment -reportname

-reportname:"<File Name for Report>"


The -reportname option specifies the name of the List or Compare report file. If the path to the report name contains spaces, then surround the path with quotes.

Run - UI, Minimized, Invisible -run

-run:invisible
-run:ui
-run:min


This option selects the level of user interface to display while files are copied.

Switches   

Description

-run:invisible

no user-interface is displayed

-run:ui (default)

the standard user-interface is shown

-run:min

Using command line variables '-run:min' is equal to
'-run:invisible' + minimizing the progress window.

 

Source Files and Directories -s

-s:<Include Pathname>
-s+:<Include Pathname>
-s-:<Exclude Pathname>
 

This option selects source files and directories for the copy.  The '-s:' and  the '-s+:' options , the '-s-:' option .

Switches   

Description

-s: <Include Pathname>

-s+:<Include Pathname>

select paths to be included in the copy

-s-:<Exclude Pathname>

excludes files from the copy
(usually within the same folder as above selected paths)

Target (Destination) Directory -d

-d:<Directory Name>
 

This option specifies the Target directory. Another way of stating this would be that this option specifies the 'Target location'.

Warnings and Errors -warn

-warn:drznl

This option enables warnings for specific event.

Switches   
Description

d

Warn before deleting a file

r

Warn before overwriting or deleting read-only files

If this option is used, the user is prompted before Double Image attempts to over-write or delete read-only files.

z

Warn before registry restore

n

Warn before over-writing a newer file with an older file

l

(lowercase L)

 

Ask before creating very long file names (Names longer than 256 characters)

Very long file names are file names longer than 256 or 260 characters, depending on the Windows Operating System.

Very long file names are not permitted on FAT volumes, and can also be pain on NTFS volumes since most Windows programs (including Windows Explorer) do not fully handle them correctly.

Double Image does handle them correctly, meaning very long file names will be copied, shown or properly deleted if required.

In the UI this option is located under the 'Warnings, Errors, & Logging' section and is called Ask before creating very long file names.

 

Warning Selections -ignore

-ignore:wea
 

This options specifies that warnings and or error events should be ignored from being displayed to the operator during the copy process. Warnings and errors will be found in the log regardless of these settings.

Switches   

Description

w

Ignore warnings

e

Ignore errors and warnings

a

Ignore all warnings and errors and any dialogs (run silent)


Wildcards: Include, Exclude -wild

-wild: <wildcard string> [,<wildcard string>] ...
-wild+:<wildcard string> [,<wildcard string>] ...
-wild-:<wildcard string> [,<wildcard string>] ...


This option selects wildcards to include or exclude.

Switches   

Description

-wild or -wild+

wildcards to include

 -wild-

wildcards to exclude