Using FAOPGP CLS
Command Line Parameters
FAOPGP CLS lets you type command parameters directly onto the DOS command line, have them processed within a batch file, or have them actioned via the Script Editor. The easiest way of creating command parameters is using the command editor (accessed via the script editor). Once you are familiar with the commands and their structure you may prefer to type them directly onto the DOS command line or save them for future use in a batch file.
NOTE : Normal batch file commands can be used in conjunction with CLS script commands. For example you may want to specify the PAUSE command at the end of a batch file to see where processing stopped or create a shortcut to a batch file and select 'minimized' from the Run options to minimize the window to the task bar.
A list of command line parameters is provided below. Orange text signifies an optional command.
See also Scheduler command line parameters
Archive Files & Folders
-archive <filename>
Action
Stores all of the selected files and folders for encryption in one single archive file.
Example
Encrypts all of the files in the 'C:\Docs' folder and places them into a single archive file called 'largefile.zip'
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -archive largefile "C:\Docs"
Auditing (log file)
-log append echo "output path & filename"
-sendlog <smtp server name> <from email address> <to email address> <subject> asmessage asattachment
-sendlogonerror <smtp server name> <from email address> <to email address> <subject> asmessage asattachment
Actions
Stores a permanent record of the actions you have performed in a log file.
append - appends a record of the new actions to an existing log file
echo - echos the actions to the screen
-sendlog - sends the log by email
-sendlogonerror - sends the log file by email only if an error occurs during processing
asmessage - sends the log file as part of the message text of the email
asattachment - sends the log file as a file attachment to the email
Examples
The log is written to a file called 'logfile.html' which is stored in the 'c:\Test' folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -log "C:\Test\Logfile.html"
Append example : The log is appended to an existing file called 'logfile.html' which is stored in the 'c:\Test' folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -log append "C:\Test\Logfile.html"
Append and Echo example : The log is appended to an existing file called 'logfile.html' which is stored in the 'c:\Test' folder and a record of these actions is displayed on the screen
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -log append echo "C:\Test\Logfile.html"
Send by Email when Errors occur example : The log file is saved to disk in the C:\Logfiles folder and is emailed to itadmin@articsoft.com only when an error occurs during processing.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams" -log append echo C:\Logfiles\log_file.html -sendlogonerror "auth.smtp.oneandone.co.uk" "info@articsoft.com" "itadmin@articsoft.com" "log file" asattachment "C:\Docs\*.*"
Send by Email example : The log file is saved to disk in the C:\Logfiles folder and is emailed to itadmin@articsoft.com only when an error occurs during processing.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams" -log append echo C:\Logfiles\log_file.html -sendlog "auth.smtp.oneandone.co.uk" "info@articsoft.com" "itadmin@articsoft.com" "log file" asattachment "C:\Docs\*.*"
Auto Login
>
-autologin <encrypted password>
Action
Auto logs you on to FAOPGP CLS. The password for your keystore is encrypted and passed automatically to the login process.
Example
When this script is run, the files are automatically encrypted for Ben Williams without the need for anyone to logon to the keystore.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams" -autologin 03019fdd3fbba98980b9ab8a6a61dafb "C:\Docs\*.*"
Backup Keystore
-backupkeystore
Action
Backs up the keystore as a file (faopen2.kspgg) to the folder of your choice.
Example
Backs up the current keystore (using your existing keystore password) to the 'C:\Myfiles' folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -backupkeystore -destination "C:\Myfiles"
Destination Folder
-destination
Action
Saves the files to a new destination folder.
NOTE : If this command is not present then files are saved to the source folder (the folder the original files exist in).
Example
Encrypts the files in the 'C:\Docs' folder for Ben Williams and saves them to 'C:\Ben"
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -destination C:\Ben "C:\Docs"
Digital Signing of files
-sign "user name <email address>"
Action
Digitally signs files by the specified user.
Example
Digitally signs all of the files in the 'C:\Docs' folder by Ben Williams
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" - sign "Ben Williams <bwilliams@articsoft.com>" "C:\Docs"
Don't Overwrite Files
-noverwrite
Action
Does not overwrite existing files if they exist with the same filenames in the destination folder.
NOTE : If this command is not present then you are automatically prompted as to whether you want to overwrite files if they exist with the same filenames in the destination folder. If you want total automation you should therefore enter either this or the 'overwrite' command.
Example
Unprotects the files in the 'C:\Pictures' folder and saves them to disk only if they have different filenames from existing ones in that folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -unprotect -nooverwrite "C:\Pictures"
Emailing of Files
-sendemail "subject" "message text"
-ignorekeysaddresses
Action
Sends protected files by email.
-ignorekeysaddresses ignores the addresses in the keys and instead uses the ones you specify
Example
Encrypts all of the files in the 'C:\Reports' folder for Ben Williams and sends them via email with the Subject text of 'Weekly Report' and the message text of 'Files as promised. Kind regards, Jill'. Note that the subject text and message text are not encrypted.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -sendemail "Weekly Report" "Files as promised. Kind regards, Jill" "C:\Reports"
Encryption of files
-encrypt "user name <email address>"
-keycompat
Action
Encrypts files for the specified user(s).
-keycompat switch for PGP v5 and v6 compatibility. Specify this switch if you are encrypting files for recipients that use PGP v5.x or 6.x. This causes TDES to be used as the default algorithm.
Examples
Encrypts all of the files in the 'C:\Docs' folder for Ben Williams
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -destination "C:\Docs"
Encrypts all of the files in the 'C:\Docs' folder for Ben Williams & Jane Fischer
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>, Jane Fischer <jfischer@prasder.com" -destination "C:\Docs"
Key Compatibility example : Encrypts all of the files in the 'C:\Docs' folder for Ben Williams & Jane Fischer using PGP v5.x and v6.x compatibilty
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>, Jane Fischer <jfischer@prasder.com" -destination "C:\Docs" -keycompat
FTP'ing files
-ftpupload server username password dir cmode tmode
-ftpdownload server username password dir cmode tmode
-ftpnodir
-ftponly
-deleteafterdownload
-rename
NOTE : The FTP password can be specified in two ways. With 'password' if you write scripts without using the CLS command editor (the password in this case has to be entered in plain text) or with 'spassword' if you are using the CLS command editor (the password in this case is encrypted using your keystore password).
Action
FTP files to and from a web server.
-ftpupload uploads files to a web server.
-ftpdownload downloads files from a web server.
-ftpnodir is for compatibility with non Unix/Linux/Windows servers as the DIR command is processed differently. The input list must contains only files. Wildcards are not supported and are treated as normal characters (ie. part of the filename).
-ftponly ftp files without using encryption or decryption routines
-deleteafterdownload deletes the file(s) from the remote server after they have been successfully downloaded
-rename renames the file(s) after download
Examples
FTP Download example : Retrieves .doc files from 'Sales' folder on the www.articsoft.com web server and places them in the 'C:\Temp' folder before encrypting them for Ben Williams.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -ftpdownload server www.articsoft.com username Administrator1 password ******** dir C:\Temp cmode passive tmode binary "Sales/*.doc"
FTP Download example 2 (non Unix/Linux/Windows servers) : Retrieves .doc files from 'Sales' folder on the www.articsoft.com web server and places them in the 'C:\Temp' folder before encrypting them for Ben Williams. This has the 'input list contains only files switch set' for compatibility with non Unix/Linux/Windows servers.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -ftpdownload server www.articsoft.com username Administrator1 password ******** dir C:\Temp cmode passive tmode binary -ftpnodir "Sales/*.doc"
FTP Upload example : Protects files in the 'C:\Mydocs' folder for Ben Williams and uploads them to the 'Salesprotect' folder on the www.articsoft.com web server.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -ftpupload server www.articsoft.com username Administrator1 password ******** dir Salesprotect cmode passive tmode binary "C:\Mydocs"
Delete files on server example : Downloads all files from the Prospects folder on the server and protects them in the C:\Sales\Quotes folder. The files in the Prospects folder on the server are then deleted.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt Ben Williams <bwilliams@articsoft.com>" -autologin 03019fdd3fbba98980b9ab8a6a61dafb -ftpdownload server www.articsoft.com username Administrator1 spassword 599bc1a026640bd3e4b9c91a88e79fc33f8088fbb0200b8fd0d89cf5b370b4dca6e8d5aeb67666b5 dir C:\Sales\Quotes cmode passive tmode binary -deleteafterdownload "Prospects/*.*"
FTP only example : Downloads the files from the Newfiles folder on the server and places them in the C:\Docs folder. Pure FTP only - no encryption/decryption occurs.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -ftponly -autologin 03019fdd3fbba98980b9ab8a6a61dafb -ftpdownload server www.articsoft.com username Administrator1 spassword d067fb4c249a1491b14280b517737ef6959b5ddc6eabe040734a5dfe57ca704307847b104dd1babe dir C:\Docs cmode passive tmode binary "Newfiles/*.*"
Rename example : Downloads the files from the Newfiles folder on the server and places them in the C:\Docs folder. Renames them all to a .doc extension. Pure FTP only - no encryption/decryption occurs.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -ftponly -autologin 03019fdd3fbba98980b9ab8a6a61dafb -ftpdownload server www.articsoft.com username Administrator1 spassword d067fb4c249a1491b14280b517737ef6959b5ddc6eabe040734a5dfe57ca704307847b104dd1babe dir C:\Docs cmode passive tmode binary -ftprename "*.doc" "Newfiles/*.*"
Overwrite Files
-overwrite
Action
Overwrites existing files if they exist with the same filenames in the destination folder.
NOTE : If this command is not present then you are automatically prompted as to whether you want to overwrite files if they exist with the same filenames in the destination folder. If you want total automation you should therefore enter either this or the 'noverwrite' command.
Example
Unprotects the files in the 'C:\Pictures' folder and overwrites any existing files with the same filenames with the newly unprotected ones
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -unprotect -overwrite "C:\Pictures"
Recursive
-recursive
Action
Includes all of a folders sub-folders when protecting, unprotecting and securely deleting files.
Example
Encrypts all of the files in the 'C:\Docs' folder and it's sub-folders
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -recursive "C:\Docs"
Rename file with .asc extension
-extasc
Action
Some servers do not allow files with extensions yet CLS can only process files with .asc or .pgp extensions. This command will add an .asc extension to a file after it has been downloaded so that CLS can process it. It does not matter if the original file had a .pgp or .asc extension as CLS will correctly process it.
Example
Downloads the encrypted file 'bankfile-8243', renames it to 'bankfile-8243.asc' and decrypts it to the folder 'C:\Docs'
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -unprotect -extasc -destination C:\Docs -ftpdownload server www.articsoft.com username Administrator1 password ******** dir C:\Temp cmode passive tmode ascii -ftpnodir "bankfile-8243"
Save encrypted files in .asc format
-asciioutput
Action
Saves all of the selected files for encryption in .asc format (instead of the default .pgp format)
Example
Encrypts all of the files in the 'C:\Docs' folder for Ben Williams in .asc format
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -asciioutput C:\Docs
Secure Deletion of Files
-wipe
Action
Securely deletes the specified files and folders
Examples
Securely deletes all of the .doc files in the 'C:\Old' folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -wipe "C:\Old\*.doc"
Securely deletes the 'C:\Old' folder amd all of its contents
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -wipe "C:\Old"
Unprotection and verification of files
-unprotect
Action
Unprotects (decrypts) encrypted files and verifies digitally signed files
Example
Unprotects and verifies all of the files in the 'C:\Docs' folder
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -unprotect "C:\Docs"
Further command line examples
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -encrypt "Ben Williams <bwilliams@articsoft.com>" -destination C:\Protected -overwrite -asciioutput -log append C:\Logs\logfile.rtf -recursive "C:\Docs"
Encrypts files and any sub-folders and their files in the 'C:\Docs' folder and stores them in the 'C:\Protected' folder. If existing files with the same filename are found in the 'C:\Protected' folder they are overwritten. Files are saved in .asc format. Actions are logged and appended to the log file called 'logfile.rtf' in the 'C:\Logs' folder.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -unprotect -destination C:\Docs -log append C:\Logs\logfile.rtf -recursive "C:\Protected"
Unprotects files and any sub-folders and their files in the 'C:\Protected' folder and stores them in the 'C:\Docs' folder. If existing files with the same filename are found in the 'C:\Docs' folder then you are prompted as to whether they should be overwritten. Actions are logged and appended to the log file called 'logfile.rtf' in the 'C:\Logs' folder.
"C:\Program Files\ArticSoft\FileAssurity OpenPGP\bin\scriptor.exe" -wipe -log C:\Logs\logfile.rtf "C:\Old"
Securely deletes the files in the 'C:\Old' folder and records these actions in the log file 'C:\Logs\logfile.rtf.