Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Powershell PGP and SFTP

Avatar of Twhite0909
Twhite0909 asked on
Scripting LanguagesPowershell
1 Comment1 Solution358 ViewsLast Modified:
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:

FinaceMM04182017.csv
FinanceMH040182017.csv
FinanceImages040182017.csv

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?
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris DentFlag of United Kingdom of Great Britain and Northern Ireland imagePowerShell Developer
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answers