Need help connecting to session and rename files – PowerShell
Hello everyone, thank you in advance!
I was tasked to automate renaming/formatting file names on a SFTP server.
I have one system that uploads a file(s) to the server and then another system picks up that file to be processed. However since the filename is not in the correct format, the second system is unable to process the files.
I've written a PowerShell script (attached below) on how I want the filenames to be formatted/renamed. However I am having difficulty implementing it (Connecting to the SFTP server and running the script). I'm extremely unfamiliar with WinSCP (I only stumbled onto it because of the given task), and also SFTP for that matter, so any help would be greatly appreciated.
I was tasked to automate renaming/formatting file names on a SFTP server.
I have one system that uploads a file(s) to the server and then another system picks up that file to be processed. However since the filename is not in the correct format, the second system is unable to process the files.
I've written a PowerShell script (attached below) on how I want the filenames to be formatted/renamed. However I am having difficulty implementing it (Connecting to the SFTP server and running the script). I'm extremely unfamiliar with WinSCP (I only stumbled onto it because of the given task), and also SFTP for that matter, so any help would be greatly appreciated.
Last edited by smcxviet on 2018-12-19 19:40; edited 1 time in total