Home > Commands N-Z > Commands S

SHARE


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Installs file-sharing and locking capabilities on your disks and network drives.


Syntax

SHARE [/F:space] [/L:locks] [/NC]

In your CONFIG.SYS file:

INSTALL=[[drive:]path]SHARE.EXE [/F:space] [/L:locks] [/NC]


Parameters
drive: ( path v3.0)
Specifies the location of the SHARE.EXE file.

Switches
/F:space (v3.0)
Allocates file space (in bytes) for the operating system storage area used to record file-sharing information. The default value is 2048.
/L:locks (v3.0)
Sets the number of files that can be locked at one time. The default value is 20.
/NC v3.0?
UNDOCUMENTED No Count -- When a program asks how many sharing locks are left, it always responds with whatever the maximum is, no matter how many locks actually are in use.

Related

none.


Notes
Common use of Share

Typically, you use SHARE in a network or multitasking environment in which programs share files. SHARE loads the code that supports file-sharing and locking in these environments. Once you install Share, the operating system uses the code loaded by Share to validate all read and write requests from programs. For example, if two people are accessing the same data file, SHARE manages the file so both people do not write to the file at the same time.


Allocating space for file-sharing information

When deciding how many bytes to allocate for file sharing, note that each open file requires enough space for the length of the full path and filename. The average length of a filename and its path is 20 bytes.


Using Share with Microsoft Flash File System

Share may be required in order to run some applications with Microsoft Flash File System.


Examples

This example shows how you can use the INSTALL command in your CONFIG.SYS file to load Share, with the default values for the /F and /L switches. The operating system searches for the file SHARE.EXE in the DOS directory on drive C.

    install=c:\dos\share.exe

This example allocates 4096 bytes for storing file-sharing information and specifies that 25 files can be locked at one time. Again, the operating system searches for SHARE.EXE in the DOS directory on drive C:

    install=c:\dos\share.exe /f:4096 /l:25

Errorlevels

none.


Availability
External
DOS
v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23
Windows
none
Windows NT
none