Share (command)


In computing, share is a command for DOS that allows software to perform file locks. Locking files became necessary when MS-DOS began allowing files to be accessed simultaneously by multiple programs, either through multitasking or networking.

Implementations

On MS-DOS, the command is available in versions 3 and later. The command is also available in FreeDOS, PTS-DOS, and SISNE plus. The FreeDOS version was developed by Ron Cemer and is licensed under the GPL. DR DOS 6.0 and Datalight ROM-DOS include an implementation of the command.
Windows XP and later versions include 16-bit commands for the MS-DOS subsystem that are included to maintain MS-DOS compatibility. The share MS-DOS subsystem command performs functions that are now inherent to Microsoft Windows. It is available to preserve compatibility with existing files, but has no effect at the command line because the functionality is automatic. The 16-bit MS-DOS subsystem commands are not available on 64-bit editions of Windows.

Design

There were five locking modes:
The program runs as a Terminate and Stay Resident program and is typically loaded at boot-up.

Syntax

share