My current FTP process (which is going to SFTP in the next 3 weeks) has several steps:
1. Retrieves a current directory list of several folders on an FTP site
2. Parses the generated file to find any 'new' files (compares file names against a SQL log)
3. If the file is new I generate a script that will download that file. (second FTP session)
4. Update SQL log with downloaded file name
Is there a way to pipe just the directory contents of a specific file. So let's say I had an SFTP site with the following directories:
With the innate windows FTP.exe the syntax is:
dir /Test1/Dir1 C:\ftp\test1\dir1\CurrentContents.txt
dir /Test1/Dir2 C:\ftp\test1\dir2\CurrentContents.txt
dir /Test2/Dir3 C:\ftp\test2\dir3\CurrentContents.txt
And these can all be run from the same FTP session.
Is there a similar functionality in WINScp?
I'm able to create a single log file that contains what i need but ideally I'd be able to keep the rest of my (powershell) script the same but just modify the batch files that perform the FTP functions.