|
![]() |
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
Automating VSFTP (VShell) - Prefer PowerShell, VBScript also OK
Hello,
I'm an absolute newbie who knows the basics of how to use VShell (VSFTP) via the command-line and is looking to automate via a script the following: 1. Connect to a remote host (w/key, keyphrase, username) 2. Navigate to a remote folder 3. Get list of files, see if they match a particular regular expression or similar 4. Download those matching files to a local folder. 5. Disconnect. I've got scripts that do this sort of thing for WinSCP but I'd like to use VSFTP. My scripting prowess is limited to PowerShell these days but still reasonably comfortable with VBScript. Any examples or assistance much appreciated. Daniel V |
#2
|
|||
|
|||
Hi Daniel,
What are the specific patterns (regular expressions) you will be matching on?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
In this instance, the regex I have come up with is as follows:
^MDFFL\d+GLOBALM_YARRAVALLE.csv.zip$ |
#4
|
|||
|
|||
Hi Daniel,
Sorry, I don't have any suggestions for you. You can use wildcards with vsftp but your needs seem a bit beyond that. Hopefully someone in the community will have a solution.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hi Brenda,
No problems. In this instance, I decided to utilise an existing installation of WinSCP on our SFTP server, taking advantage of the WinSCP .NET Assembly and COM Library to use with Microsoft PowerShell, I then configured my script to run periodically with Task Scheduler on the SFTP server. Its a shame that for whatever reason the VShell wouldn't play nicely with this particular 3rd party SFTP server I was connecting with (without needing an additional sftp-version switch), but I'm happy with the support you've provided and we continue to use VShell for the rest of our corporate SFTP usage scenarios. Happy for this ticket to be marked closed if that's how it works. |
#6
|
|||
|
|||
Hi Daniel,
Quote:
One of our developers (having done analysis of a log of a connection where change directory failed) wrote an email to that vendor (in 2012) and stated: Quote:
*The it in above sentence being the SilverSHielD server's response to the sftp client request. And the SilverSHielD developer's reply was: Quote:
Since you are now connecting to version 6 of that server software... [LOCAL] : VENDOR-NAME: Extenua...either the same SilverShielD bug was re-introduced or it was never fixed. ![]() So you (or the SFTP server admin) should contact SilverSHielD about this issue.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 Last edited by jdev; 07-10-2019 at 11:23 AM. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|