Client Current Dir

From BR Wiki
Revision as of 15:57, 7 May 2013 by Laura (talk | contribs) (Created page with "The '''Client_Current_Dir''' config specification. Client_Current_Dir(full_pathname_on_client) / @S This path will be passed to Windows as the [[Starting Directory]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Client_Current_Dir config specification.

Client_Current_Dir(full_pathname_on_client) / @S

This path will be passed to Windows as the Starting Directory during subsequent client shell calls. This statement can also be called dynamically with the CONFIG command.

The '@S' value specifies to keep the client in sync with the server. Each time a CD is performed on the server a corresponding CD is issued on the client. This requires that the second parameter of the BR drive statements match the Samba drive mappings.

If a Client_Current_Dir statement is subsequently executed which specifies a directory (instead of @S) then no further attempt will be made to correlate client and server current directories.

If Client_Current_Dir statement specifies @S, then a CD is performed on the client to match the current directory on the current drive on the server, at the point where the config statement is processed.

From that point on all subsequent server CD commands (done in BR) are mirrored on the client, for example:

Client_Current_Dir  @S

To use this feature, the Samba (or Vision, etc.) drive letter must map to the same logical drive letter (first DRIVE statement parameter), as it does in the DRIVE statement, and the root directory on such Samba drives must be the directory that is pointed to by the second parameter of the DRIVE statements on the server.

For example, let's say a Linux server has a path /wrk/user/br/ that contains the application, and if Samba defines /wrk/user as the root directory on drive J. Then the corresponding DRIVE statement should be:

DRIVE J:,/wrk/user,x,\BR

Then if the BRCONFIG.SYS file contained "CLIENT_CURRENT_DIR @S", then a CD \BR\DATA would set the current directory to DATA on both the client and the server.

This is useful for COPY filename @:filename2 commands (copies to the client). Note that correlation of Samba drives with the second parameter of BR Drive statements is also useful for ODBC and SPOOLCMD purposes.

The CONFIG CLIENT_CURRENT_DIR statement can now be issued dynamically.