Workstation Directory Management -- Support

 

Update and Synchronize files on a Workstation

This document answers some FAQ, support issues, and provides some How To instructions. Remember, the contents can be searched using the sites search feature!

Table of Contents

Limitations
Scripting

Limitations

Does not remove extra directories from the target
Does not handle if a directory exists on the target with the same name as a file on the source. The condition is reported.
Does not appear to processes scripts if run minimized

Scripting

A script is a text file that contains lines in the form:

KeyWord [options]

Keyword Options Description
Batch On or Off Default is OFF: each EXECUTE command clears the list of update actions. When ON updates from multiple pairs of source and target directories are gathered so they can be updated at one time at the end of the script. See EXECUTE and UPDATE
Close If the application window is minimized, the application is closed.
CopyFile source-file Copies the file to the filespec stored in the Registry String Value (See RegSetStr)
Delete On or Off Default is OFF: any extraneous files are left in the target. When ON, files that are found on the target subtree without a counterpart in the source subtree are erased prior to copying the other updated files.
DeleteFile

fn or *RegStrVal

Deletes the file specified, or if *RegStrVal is specified, then deletes the file indicated by the Registry String Value (See RegReadStr and RegSetStr)
Exact On or Off When ON files will be RESET on the target unless the timestamp and size exactly match the source. When OFF a file is replaced only if the source file is newer than the target.
Execute Analyses the changes required to synchronize the source and target. If REVIEW is OFF the updates are automatically applied.
Folders On or Off When ON, all subtrees of the source are considered for updating the target.
New On or Off When ON, files from the source that do not exist on the target will be created. When OFF, files that are not yet on the target are skipped.
RegDeleteKey key-name Deletes the root/key from the registry
RegKey key-name Sets the active key name in the registry
RegReadStr var-name Reads root/key/var-name and saves the value into the internal Registry String Value location
RegRoot root-name Sets the active ROOT of the registry
RegSetStr any-string Sets the Registry String Value (an internal "memory location") to the string specified
RegWriteStr var-name Stores the internal Registry String Value into the root/key/var-name
Review On or Off When ON, the user is given the opportunity to review the proposed updates before they are applied. Individual items may be disabled. When OFF, the updates are applied immediately after the EXECUTE. If BATCH is on, REVIEW should be OFF and an UPDATE command included near the end
Source path Sets the source path. Include the ending backslash.
StampFile filename Sets the timestamp of the indicated file to the largest timestamp of any file in the source directories considered for updates. This can be used to change another scripts timestamp. This command should be one of the last in the script See Stamped below.
Stamped Close Checks the timestamp last stored in the registry of the workstation against the timestamp of the current script. If they are identical the script ends. If CLOSE is also specified and the application is minimized, the WDirM ends. If the timestamps are not identical, the script continues. At the end of the script, if no errors were encountered the timestamp of the script is stored in the registry.
Update Performs all pending updates
Window Minimized or Normal Default is Normal. Then the user gets to see the pretty progress bar!
; A Comment line. Can also use REM

Sample script:

; set options
Stamped
FOLDERS ON
BATCH ON
NEW = YES
DELETE OFF
REVIEW ON
EXACT ON
SOURCE C:\TEMP\
TARGET S:\TEMP\
EXECUTE
SOURCE D:\TMP\
EXECUTE
UPDATE
; Window Minimize
StampFile c:\temp\t.txt
CLOSE

Back to Top
     
Feedback
Copyright © 1997-2004 [S&S Resources]. All rights reserved.
Information in this document is subject to change without notice. -- Last Updated 12 July 2001
Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.
 

Back to Top
     
Feedback
Copyright © 1997-2004 [S&S Resources]. All rights reserved.
Information in this document is subject to change without notice. -- Last Updated 12 July 2001
Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.