Directory Toolkit Script Syntax
Directory Toolkit Version 3.3+
Funduc Software, Inc
Copyright 1997-2017
http://www.funduc.com   http://www.searchandreplace.com
support@funduc.com   

Listed below is the script syntax for Directory Toolkit. Our Folder Synchronize can read these scripts w/o modification.  Directory Toolkit switches that are not available in Folder Synchronize are ignored by Folder Synchronize. See below for a brief overview of differences.

For more information, see directorytoolkit_syntax.htm, DT.sfs, DT_ScriptFilterSettings.txt, and ScriptColumnDefinitionSettings.txt, and the example scripts - Example1.sfs, Example2.sfs, & Example3.sfs. Also see see foldersynch_syntax.htm, FoldSync.sfs, and FS_ScriptFilterSettings.txt.

# Format of Directory Toolkit Script Files
# GENERAL COMMENTS
# ================
# The [Default] Section, which is optional, is used to specify
# parameters for all [Action ]s in the script.  You can also specify
# parameters specific [ActionX] section(s).  For example,
# see [Action3] section below.
# All scripts must have at least one [Action ] section!! For this model
# script, [Action1] and [Default] are redundant -- both have the same
# path settings. In actual use, for single [Action] scripts you would
# not specify [Default] and would instead use [Action1] alone

[Default]
# *** PATH SETTING ***
# Note: If Path1= or Path2= setting are listed in [Default], create a
# [Action1] tag with no Path1= or Path2= setting in order to use
# Path1= or Path2= as specified in [Default].
# If your [Action1] section section has a Path1= and Path2= settings
# they will supercede what is specified in [Default].
Path1=i:\test
Path2=i:\testsr

# *** SYNCHRONIZE/COMPARE OPERATION TO PERFORM ***
Operation=1
# If not specified, Default Operation = 6.
# The synchronize operation to use is established using the switches below.
# Use only one switch per [ActionX] section.
# However, different [ActionX] sections within the same script
# file may use different operations.
# Use a value of 6 (Compare Only) to generate an output report
# without  performing any synchronize operations.

# OPERATION        SWITCH VALUE    ACTION
# ---------------- --------------- ------------------
# Synchronize      0 (-2 prompted) Update & Add in both directions
# Augment          1 (-3 prompted) Add only new to target
# Refresh          2 (-4 prompted) Update only existing in target
# Update           3 (-5 prompted) Update & Add new to target
# Prune            4 (-6 prompted) Update, Add new, Remove Orphans
# Remove Identical 5 (-7 prompted) Remove identical files from target
# Compare Only     6 (-8 prompted) Display only - No synch operations
# Recreate Dirs    7               Recreate directory structure only - No
#                                   files are copied.
# Prompt only      -1              Display synch dialog with no default
#                                   negative values above serve as default
#                                   settings in dialog.  This can give you
#                                   the opportunity to check progress or
#                                   perform other cleanup before continuing

# *** FILE MASK ***
# File masks are specified with the Mask= switch. Complex file masks
# can be used.
# If no mask is specified the default assumed is *.*
# If you have Directory Toolkit, see the Directory Toolkit complex
# mask dialog for a builder to help you construct complex masks.
# Examples:
#  Mask                     Effect
#  --------------------     ---------------------------------------------------
#  *.i??                    Include files ending with .i followed by 3 characters
#  win.ini                  This would be found by the above.
#  ~moricons.dll            Exclude this specific file.
#  ~\images\te*\            A wildcard (te*) to skip images\test, images\testing, etc.
#  ~\*\junk*\*\*.*          Skips all files in any subdir junk* and all under that
# All subdir specifications are relative Path1= and Path2=
# Separate multiple specifications with ; character. For example,
#  *.*;~\*\junk*\*\*.*
#
Mask=*.*

# *** PROCESS SUBDIRECTORIES ***
# 0 = Do not search subdirectories.
# 1 = Search subdirectories.
# If not specified, Default = 1.
Search_subdir=1

# *** OUTPUT FILE FUNCTIONS ***
# To create an Output File of the results, specify a path & file name
# using the Output File= switch. Leave blank to not write an output file
# To write to the output file in Apppend mode, use the
# Append to Output File=1 setting.
# 0 = No. The Output File specified in [Default] is overwritten by
#     each subsequent [ActionX] operation.
# 1 = The Output File specified in [Default] is written to in Append
#     mode. Subsequent [ActionX] operations are appended. Likewise, if
#     the file already exists, any existing content is preserved.
# It is OK to define different Output Files for each [ActionX] section.
Output File=
Append to Output File=1

# *** REPLACEMENT CONFIRMATIONS ***
# Controls
# 0 = No confirmation file update prompts for file replacements are
#     supplied.
# 1 = Confirmation prompts will be made.
# If not specified, Default = 1.
Confirm Updates=1

# *** PERFORM BINARY FILE CONTENTS COMPARISON ***
# Use this to perform a byte level contents comparison when two
# files have an alike name but different file date. The files will
# be considered identical if the contents are the same. Enable this
# only if you need it -- because the entire file must be read,
# processing will be slower, especially when network paths are
# involved.
# Values:
# 0 = Do not perform binary file checks on liked named files of the
#     same size.
# 1 = Perform binary file checks.
# If not specified, Default = 0.
Check Same Size Files=0

# *** DISPLAY DIFFERENT / IDENTICAL FILES ***
# Use these switches to control whether the program includes
# different &/or identical in your synchronize or comparison
# operation.
# Values:
# 0 = Do not display & include in the Output File (if specified)
#     the files that are different/identical.
# 1 = Display (& include) files that are different/identical.
# If not specified, Default = 1.
Show Different=1
Show Identical=1

# *** LOCATE SAME NAMED FILES ***
# Use the Match In Subdir=1 switch to enable a special mode to
# search for duplicate files on your disk, e.g, to scan for
# duplicate DLLs or ferret out like-named documents across
# different subdirectories. In general, you would specify the
# same path for Path1= and Path2= when using this mode, although
# other two different paths can be scanned as well. Do not enable
# Match In Subdir=1 if you do not need it - the file lists returned
# are generally not what what you would want for a typical
# synchronize operation. Operation=6 is the most common usage.
# Values:
# 0 = Do not search for duplicate files in the paths.
# 1 = Perform a Match Duplicate Files comparison. When 1 is
#     specified here double check that you specified identical
#     paths for Path1 & Path2.
# If not specified, Default = 0.
Match In Subdir=0

# *** TIME CHECK PRECISION ***
# Because Windows XP + uses a more accurate time stamp for
# files than Windows 95/98, directory comparisons across a network
# between a Win95/98 machine and a machine running NT may lead to
# false mismatches a second apart (Win95/98 precision is on even
# seconds). Time Check Precision= can be used to establish a +/- range,
# inside of which two files will be considered identical if their
# name & size is the same.
# Specify the value in seconds to use for Time Check Precision.
# If not specified, Default = 3.
Time Check Precision=3

# *** USE OS vs INTERNAL CONFIRMATION DIALOGS ***
# The Use OS Operations= switch controls internal file
# confirmation dialogs instead of standard Windows 95/NT dialogs.
# The internal dialogs provide more information and choices
# than the native Windows dialogs. Please note however that some
# network drivers & removeable media may require 'native' mode. If
# you have trouble with subdirs not being created on a path, try
# Use OS Operations=1
# Values:
# 0 = Use Directory Toolkit's internal file confirmation dialogs.
# 1 = Use native file operations.
# If not specified, Default = 1.
Use OS Operations=1

# *** INCLUDE FILES THAT EXIST ONLY IN ONE PATH ***
# Show Files in 1 Dir= is used to control whether orphan files in
# one or the other path are included in an operation. In most cases
# you will probably want Show Files in 1 Dir=1.
# Values:
# 0 = Do not display (& include in the Output File) files that exist
#     in one directory only.
# 1 = Display (& include) files that exist in one directory only.
# If not specified, Default = 1.
Show Files in 1 Dir=1

# *** CASE SENSITIVE NAME MATCHING ***
# Use this to compare names case sensitive or not.
# Values:
# 0 = Do not consider the file name case when determining if two like
#     named files are different.
# 1 = File name matching will be case sensitive.
# If not specified, Default = 0.
Case Sensitive=0

# *** OVERWRITE BLOCKS - NEWER &/or OLDER FILES ***
# The two switches below are used to prevent the replacement of
# newer and/or older files. For safety reasons you probably should
# keep 'Newer Overwrite' turned off -- If enabled, a synchronize
# could replace newer files with older versions!!! If 'Newer
# Overwrite' is not specified the program default is disabled.
#
# 'Older Overwrite' should probably be enabled (this is the default).
# If you disable 'Older Overwrite', older versions of files will not
# be updated with newer versions during a synchronize.
# Values:
# 0 = Do not overwrite files (or offer confirmation prompts) during
#     any of the synchronize operations that "update" existing files.
# 1 = Permission granted to overwrite files.
# If not specified, Newer Overwrite=0 and Older Overwrite= 1.
Newer Overwrite=0
Older Overwrite=1

# *** DISPLAY AND OUTPUT COLUMN SETTINGS ***
# The Display Columns= and Output Columns= switches can be used to
# control the layout of Funduc Software's Directory Toolkit GUI
# display and the layout of the output report in Directory Toolkit
# and Funduc Software's Folder Synchronize. The default used for a
# script are the settings in place when the program was last run
# interactively. Describing the possible manual settings is
# complicated. Please see 'ScriptColumnDefinitionSettings.txt', that
# is installed in the program path, more information and some example
# setttings.
# Display Columns=
# Output Columns=

# *** GROUPING SIMILAR FILES ***
# When Group Files=1 is specified, the program clusters files in a
# comparison display by file name, with orphaned files grouped at
# the top or bottom of the list. When Group Files=0, comparisons are
# organized such that 'missing' or 'unmatched' files are visible
# within the context of other files according to the sort order.
# The values are:
# 0 = Do not group files.
# 1 = Group files.
# If not specified, Default = 0.
Group Files=0

# *** SORTING OPTIONS ***
# To sort the file listing, use one of the values below.
# To control ascending vs decending, use the Sort Type=
# switch.
# Field to sort on:
# SORT_BY_NONE = -1 (default if nothing specified)
# SORT_BY_NAME = 0
# SORT_BY_TYPE = 1
# SORT_BY_DATE = 2
# SORT_BY_SIZE = 3
# SORT_BY_PATH = 4
# SORT_BY_CHKSUM = 5
# SORT_BY_CRC32 = 6
Sort Compare=-1

# For Ascending vs Descending, Sort Type= values are:
# 0 = Descending
# 1 = Ascending
Sort Type= 1

# *** FILTERING FILES ***
#
# The Mask= switch filters files by name &/or path.
#
# Other switches are available to filter files by size, date, and
# file attribute. These switches are:
#  Min Size Filter=, Max Size Filter=, Min Date Filter=,
#  Max Date Filter=, Skip Files Mask=, and Ignore Attributes=.
#
# Reverse Filters= switch is used to cause these switches to
# function as 'exclude' or 'include'.
#
# The number of possible combinations of settings is extensive and
# difficult to explain. Please see the file, ScriptFilterSettings.txt,
# that is installed in the program path more information and some
# example setttings.
#
# Max Size Filter=
# Min Date Filter=
# Max Date Filter=
# Skip Files Mask=
# Ignore Attributes=
# Reverse Filters=

# *** ADDITIONAL ACTIONS ***
#
# Scripts can carry out more than one action. To do this, make
# [ActionX] as modelled below. They can be specified in any
# order in the script. The program program parses the entire
# script and implements the 'Actions' sequentially, based
# on their number,
# e.g., [Action1], [Action2], [Action3], etc.
# Setting specified in [Default] will be in effect if that same
# switch is not specified in a given Action section.

[Action1]
Path1=i:\test
Path2=i:\testsr

[Action2]
Path1=i:\testsr
Path2=i:\test
Operation=1

[Action3]
Path1=C:\My Documents\Current Projects
Path2=C:\My Documents\Backup
Operation=1
Mask=*.doc;*.txt;~\*\Project10\*\*.doc
Confirm Updates=1
Search_subdir=1

 

Functional Differences Between Script Styles

Folder Synchronize Syntax

Directory Toolkit Syntax

No Cancel Switch
Custom BMP during operation
Custom Message during operation    
Disable progress meter
Destination= preview path
Environment vars for Source= & Target=  
One operation per script file
Available
Available
Not Available
Available
*Available

Not Available
Not Available
Not Available
Not Available
Not Available
Not Currently Available
Multiple operations in a single script file
Log append via the Append to Output File= switch
Configurable output log format
ZIP comments listed in output log (if enabled)
Choices about sort order of output report
*Various filters

*Note: The two programs use different verbs for the two of the filter-related switches.
See script documentation for more info.