Commands > LIT Commands

ATSYNC

Updated January 2009

ATSYNC {hostdir} {,pcdir} {switches}

This command is used to easily synchronize a directory from the server to the permanent cache on the PC. The PC in question is running ATE, and that is the only context in which ATSYNC is used.

Parameters

hostdir

if not present, ATSYNC uses the current directory. Otherwise the command should specify a directory in either AMOS or native syntax.

pcdir

if not present, the default is the %ATEPERMCACHE% which is the environment variable automatically set up to point to the permanent cache directory on the ATE client. Otherwise, it can be a native Windows directory specification (with optional embedded environment variables using the %envvar% syntax).

switches

 

Switch

Function

/C

Continue trying even after a transfer error

/D

Delete files from PC target dir not in host source dir

/P

Display progress info

/NOERR

Don't display FTP errors, just return status

/L{:f}

Output to file rather than screen. If filename ("f") is not specified, output file is ATSYNC.LST.

/?, /H

Writes switch listing and usage info to the screen.

 

Comments

ATSYNC relies on FTP (or SFTP) as configured on the ATE client. The FTP root directory must agree with the root directory as seen by A-Shell on the server.

ATSYNC sends a list of all the files in the Hostdir to the ATE client, which compares the size and modification date against the version on the PC. For those files where the server version is newer than the PC version, or for which the PC version doesn't even exist, ATE will initiate a file transfer. If the /D switch is specified, then after the files are transferred, it deletes any file in the target PC directory that was not present in the source directory on the host.

See also the discussion on the ATE environment variable.

History

2009 January, A-Shell 5.1.1177

The ATSYNC mechanism can now be disabled by creating a registry item DisableFileSync (DWORD) within the current ATE profile (HKCU\Software\MicroSabio\JBCT\ATE\Hosts\profile-name\DisableFileSync) and setting it to 1. The motivation behind this odd feature is to accommodate certain "power users" (presumably developers or tech support staff) who have to connect remotely to multiple sites (running different versions of the application) and who don't necessarily want to have icons, bitmaps, subroutines, etc. synchronised to the PC each time.

You are on your own to create and set this registry value, but once set, ATSYNC.LIT will abort immediately with error -4.

2008 December, A-Shell 5.1.1131

ATSYNC.LIT 1.0(107) now supports hash codes as a way of making sure whether files are different or not. Also, it now works from within a CMD or DO file. Previously, the CMD file interfered with the input of status responses coming from the ATE client, causing it to act as if no files needed transferring.