Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).
I get a syntax error when using wildcard characters in arguments to the PGPENCRYPT or PGPDECRYPT commands. I need to handle multiple files. How do I handle this?
Wildcard characters are not permitted in PGPENCRYPT or PGPDECRYPT commands.
If you have multiple files or if you do not know the name of the files to encrypt or decrypt then you need to use the GETNEXTFILE command to identify the file(s) and then pass the file name in a variable to the PGPENCRYPT or PGPDECRYPT commands. Doing this inside of a loop will enable GETNEXTFILE to find all of the files that match a given wildcard pattern. Here is a simple example of how this is done:
:loop GETNEXTFILE "*.txt" /timeout=5 IFERROR= $ERROR_WAIT_TIMED_OUT goto no_more_files SET target = %nextfile + ".gpg" PGPENCRYPT %nextfile target /email=xxxxxx GOTO loop :no_more_files
NOTE: The /email option was deprecated in Robo-FTP 3.10. Users of Robo-FTP 3.10 and later should use the /encryptfor option instead. See the Help file for details.
Article last updated: 2021-11-05
Tags: Wildcard, PGP, Robo-FTP