Topic "Create a Session from the command line interface"

Author Message
Ranger1230
[View user's profile]

Joined: 2011-12-05
Posts: 1
What I want to do is have my program be able to use WinSCP to ftp a file to a server.
I was told that having it create a new temporary session every time I go to upload a file was bad for performance and would cause issues with the server. as a result I'm trying to find a way to check if a session exists if not save one with the given settings, if it does use it to upload the file.

Is there away to do this?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Not sure what to suggest, not knowing your complete workflow.

But in general, you should assemble one script file with list of all files to be uploaded and than execute the script at once.
_________________
Martin Prikryl
Nonamer

Guest


Keepuptodate will not delete from remote site, synchronize updates the whole structure, not just one folder.

Therefore I use Put- delete to operate a 1-minute interval polling file transfer task. It is dumb, right?

How could I move away from this billion-session-openings solution, e.g. open session once and before running the put/get, to check whether the connection exists and reopen if it is down.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Nonamer wrote:
Keepuptodate will not delete from remote site

Use -delete switch

Quote:
synchronize updates the whole structure, not just one folder.

Use file mask to narrow the synchronization.

Quote:
How could I move away from this billion-session-openings solution, e.g. open session once and before running the put/get, to check whether the connection exists and reopen if it is down.

Use WinSCP .NET assembly:
http://winscp.net/eng/docs/library
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License