Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Microsoft DOS lock/unlock command

Quick links

About lock / unlock
Availability
Syntax
Examples

About lock / unlick

Lock allows a user to lock a drive, enabling direct disk access for an application.

Unlock allows a users to unlock a drive, disabling direct disk access for an application

Availability

The lock command is an internal command that is available in the below Microsoft operating systems.

Windows 95
Windows 98

Index

Category:
MS-DOS

Companies:
Microsoft

Related Pages:
Operating systems

Resolved

Were you able to locate the answer to your questions?

Syntax

LOCK [drive:]

drive: Specifies the drive that needs to be locked.

UNLOCK [drive:]

drive: Specifies the drive that needs to be unlocked.

Examples

lock c:

Lock the C: drive

When typing the above command you will receive the below prompt.

WARNING: The LOCK command enables direct access by programs
that can CORRUPT file names and/or DESTROY disk data, resulting in the
loss of files on your disk.

Are you sure (Y/N)?

unlock c:

Unlock the C: drive

It is important to know that if errors occur indicating that a process, such as fdisk or a setup of a new program or operating system, cannot continue because the hard disk drive is locked, that using the unlock command will resolve this issue. 

 

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope