What do I encrypt/decrypt a file from the command line?

John Savill

January 8, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. A command line utility, CIPHER.EXE, can be used to encrypt and decryptfiles from the command line.

CIPHER [/E | /D] [/S:dir] [/I] [/F] [/Q] [dirname [...]]

/E Encrypts the specified directories. Directories will be marked so that files added afterward will be encrypted.
/D Decrypts the specified directories. Directories will be marked so that files added afterward will not be encrypted.
/S Performs the specified operation on directories in the given directory and all subdirectories.
/I Continues performing the specified operation even after errors have occurred. By default, CIPHER stops when an error isencountered.
/F Forces the encryption operation on all specified directories, eventhose which are already encrypted. Already-encrypted directories are skipped by default.
/Q Reports only the most essential information.
dirname Specifies a pattern, or directory.

Used without parameters, CIPHER displays the encryption state of the current directory and any files it contains. You may use multipledirectory names and wildcards. You must put spaces between multiple parameters.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like