Avatar of Twhite0909

asked on 

Powershell PGP and SFTP

I want to use Powershell to write a script that will check a directory for all .csv files, encrypt them using PGP then send them via SFTP.

The folder will get 3 new .CSV files everyday.  The naming convetion for each will remain the sam excetp the date will change so it will look like this:


I need the the script to do the following:

1. Look in a directory lets say "D:\Client\Folder1\" which will contain a the 3 files above but would require some sort of * or wildcard to grab the beginning letts but account for the changing numericals.

2. Use PGP to encrypt each .CSV and turn it into .PGP

3. Send the .PGP to an SFTP site

My director LOVES RoboFTP for some reason so Id like to try and get a similar script via Powershell to show it can be done.

Can it?
PowershellScripting Languages

Avatar of undefined
Last Comment
Chris Dent

8/22/2022 - Mon