Powershell to check FTP command results

asked 2023-01-10T15:50:18.977+00:00
Stefano Colombo 221 Reputation points

I'm trying to create some scripts to upload/download files via ftp and wonder how to catch the results to see if the operation succeeded for all the files. We are using several functions that made the jobs , and got an output like the following

MKD for '' executing Response: '257 "/OUT/bck" created successfully. ' STOR for '' complete' STOR for '' complete'

How can we catch such outputs to check for possible error during the FTP ?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,607 questions
{count} votes