ftp
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-02-17 12:41 PM
Hello,
Is there a way to get files via ftp or or sftp in a specific object? I could not find any specific information on the portal.
Thank you, kind regards.
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-17 04:52 PM
Hello,
Thank you for your reply, so I understand that a code stage should be used for this configuration. Do you have a sample code for downloading a file from SFTP or FTP?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-02-17 09:15 AM
void DownLoadFTP()
{
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = "xxxx",
PortNumber = 21,
UserName = @"xxx",
Password = "xxx",
};
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
string remotePath = "/Test/",localPath = "D:\\2\\;
TransferOptions ops = new TransferOptions();
ops.TransferMode = TransferMode.Automatic;
TransferOperationResult rst = session.GetFiles(remotePath, localPath, false,ops);
session.Close();
// Your code
}
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-03-17 08:31 PM
I have managed to install it and use it but it was more complicated than I expected.
Here are the details:
1. Download of Winscpnet assembly: https://winscp.net/eng/download.php
2. Created an installation file using InnoSetup including WinSCPnet.exe and WinSCPnet.dll to install in C:\Program Files (x86)\WinSCP (Could be anywhere else as long as all resources use the same path)
3. In the InnoSetup it is important to specify that we want winscpnet.dll to be added to the Global Assembly Cache (GAC). My [File] section looks like below:
[Files]
Source: ""C:\Program Files (x86)\WinSCP\WinSCP.exe""; DestDir: ""{app}""; Flags: ignoreversion
Source: ""C:\Program Files (x86)\WinSCP\WinSCPnet.dll""; DestDir: ""{app}""; StrongAssemblyName: ""WinSCPnet, Version=1.3.7.7333, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, ProcessorArchitecture=MSIL""; Flags: ignoreversion gacinstall uninsnosharedfileprompt
4. You must restart Blueprism in order to recognize the modified GAC
If you downloaded a different version than 1.3.7.7333, you must get it's PublicKeyToken.
1. Start the Developer Command Prompt for Visual Studio
2. Go to the DLL folder and type in ""sn –T winscpnet.dll""
If you can't bother with any of the above, I have put the install file on my OneDrive account.
https://1drv.ms/u/s!AlJUlmssD6dC70qrWjaPqQXBzzRn
Hope this helps.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
31-01-18 05:16 PM
Are posts missing from this thread? It doesn't seem to flow logically.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-03-18 07:52 PM
Yes some posts are missing. I can't remember the whole conversation but I know I found installing the free winscp assemblies was the way to go for me to use SFTP.
If you go FTP only, then .Net would be simpler to use in a code stage.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-03-18 03:18 PM
I have designed an object to operate FileZilla
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-03-18 10:20 AM
Can share that object here @ Neville.watson
