cancel
Showing results for 
Search instead for 
Did you mean: 

ftp

begum_atalay
Level 2
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

begum_atalay
Level 2
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?

TienNguyen1
Level 2
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 } }

Carol.Ouellet
Level 5
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.

NevilleWatson
Level 4
Are posts missing from this thread?  It doesn't seem to flow logically.

Carol.Ouellet
Level 5
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.

NevilleWatson
Level 4
I have designed an object to operate FileZilla

jayakishanbodd1
Level 2
Can share that object here @ Neville.watson