Commands & Syntax > Commands > Folder Manipulation >

www.perfectkeyboard.com

 

ENCRYPT/DECRYPT - < dir_encryption >() ... [Pro]

 

Folder ENCRYPT/DECRYPT
<dir_encryption>("Input","Output",Operation,Encryption bit strength,"Password")
Available in: Professional edition

This command encrypts/decrypts all files within an input directory (folder) including all sub-folders. Encrypted files are located in output directory. An extension ".aes" is added to the encrypted files. For example, file "Invoice_01256.doc" is encrypted to "Invoice_01256.doc.aes".

 

#

Parameter name

Parameter description

1

Input

(Full) path to a directory (folder) that is to be encrypted/decrypted. Example: "c:\myPrivateDocuments".

2

Output

Directory (folder) where encrypted/decrypted files are located. Example: "c:\myPrivateDocuments_Encrypted".

3

Operation

This parameter can be one of these:
ENCRYPT_AES - the files are encrypted using AES.
DECRYPT_AES - the files (previously encrypted using ENCRYPT_AES) are decrypted.

4

Encryption bit strength

Strength of the encryption. These values are supported: 128, 192, 256.

5

Password

User defined password that is used to encrypt/decrypt the files. A directory encrypted by a password can be successfully decrypted again only if the same password is used.

 

Example (Macro Steps):

 

1

<#> <#> This example shows how to encrypt whole folder.

2

<#> <#> The second example shows how to decrypt it again.

3

Macro execution: ONLY COMMANDS

4

<#> <#> Create folder for sample files

5

Folder CREATE "c:\temp\dir_encryption_sample"

6

<#> <#> Create sample files

7

File SAVE TEXT "This is a sample file 1." to file "c:\temp\dir_encryption_sample\1.file_original.txt

8

File SAVE TEXT "This is a sample file 2." to file "c:\temp\dir_encryption_sample\2.file_original.txt

9

Folder ENCRYPT/DECRYPT Input = "c:\temp\dir_encryption_sample", Output = " c:\temp\dir_encryption_sample_Out", Operation = " ENCRYPT_AES", Encryption bit strength = "128"

10

<#> <#> Open folder to see the results

11

Folder OPEN open folder "c:\temp\dir_encryption_sample_Out" in Windows Explorer.

Example (Plain Text):

 

<#> This example shows how to encrypt whole folder.

<#> The second example shows how to decrypt it again.

<cmds>

 

<#> Create folder for sample files

<dircreate>("c:\temp\dir_encryption_sample",0)

 

<#> Create sample files

<data_save>("This is a sample file 1.","c:\temp\dir_encryption_sample\1.file_original.txt","")

<data_save>("This is a sample file 2.","c:\temp\dir_encryption_sample\2.file_original.txt","")

 

<dir_encryption>("c:\temp\dir_encryption_sample", "c:\temp\dir_encryption_sample_Out", ENCRYPT_AES,128,"dirpwd")

 

<#> Open folder to see the results

<diropen>("c:\temp\dir_encryption_sample_Out",0)