Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

How can i use winscp to transfer file in the sftp server using vb2005?

can please provide a sample code.



Thank you very much in advance.
Posted

1 solution

In the documentation, I cannot see any API. This is the application, not a library. That means, using it as a library cannot be productive. (Do you really understand the difference?)

Please see by yourself:
http://en.wikipedia.org/wiki/WinSCP[^],
http://winscp.net/eng/docs/start[^].

However, as this is an open-source product, you can extract the code you need and try to use it in your code. But remember, this is C++, so you might need to 1) translate the code into .NET and VB.NET; 2) create a .NET wrapper of it using P/Invoke, or 3) create a .NET wrapper of it using C++/CLI. Are you familiar with any of these technologies or are you willing to learn them? If you are a novice, it won't be very easy task.

You could be more successful if you try to find some pure .NET library for SFTP, which is quite possible:
http://bit.ly/NcJ4y0[^].

—SA
 
Share this answer
 
Comments
Alan Tuscano 9-Jul-12 21:40pm    
Hi Sergey, Thanks for the quick reply.

searching the web for winscp sftp.. i am always being directed to "PuTTY"? and PuTTY is a 3rd party software(Free).

I haven't check the links you provide, but.. can Winscp alone do the work or i will need to download and use 3rd party software like "PuTTY"?
Sergey Alexandrovich Kryukov 10-Jul-12 23:08pm    
Bad idea, if you want use it directly. A separate process is a separate process; the processes are isolated. We call it "scratching right ear with a left hand".
--SA
Alan Tuscano 10-Jul-12 3:56am    
Hi Sergey,

I can Access SFTP Server/Folder using winscp.. can you please help me and provide sample code on how to upload/download textfile to the sftp server using winscp.

I really have no idea how to do it/...


Thanks a lot..
Sergey Alexandrovich Kryukov 10-Jul-12 23:09pm    
Sorry, it makes little to no sense, because this is wrong idea, of a dead-end sort.
--SA
Alan Tuscano 12-Jul-12 22:04pm    
Hi SA,

Finally got Access, Upload and Download files from SFTP.

Thanks...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900