How To Encrypt And Decrypt Files in Windows Using Command Prompt

Windows has native support for file encryption. Today We are going to explain how to encrypt and decrypt files and directories in Windows using command line.

Window had inbuilt cipher.exe for this purpose . So below are the ways how to use this command.

Encrypt Files from Windows command line:

To perform encryption in single file you can run this command

cipher /A /E filename

To Perform encryption on a list of files

cipher /A /E filename1 filename2 filename3

Read Also: How to Recover Permanently Deleted Files in Windows 10

Encrypt Folder

By encrypting a folder we should make sure that all files that will be added to the folder in future will be automatically encrypted.

To encrypt the directory ,run the below command

cipher /E directoryname

To encrypt all the files in the folder:

Run the below command to encrypt all the files in a folder.

cipher  /E directoryname\*

For Example to encrypt all the files in the folder F:\docs, the command line will be like this

cipher /E  F:\docs\*

Encrypt a folder including all subfolders

We can add /S Switch to perform encryption recursively on each of the folders

cipher /E /S :directoryname

Encrypt folder and files:

Encrypt a folder and all the files and sub folders in that directory :

cipher /A /E /S: directoryname

Decrypting files and folders:

The commands for files and folders decryption are similar to the one mentioned in the above case . You just need to replace the /E to /D.

Thanks Fore Reading this article If you have any question regarding this article kindly post comments below.

 

We will be happy to hear your thoughts

Leave a reply

TechBizy
Logo
Enable registration in settings - general