Create a Session from the command line interface

Advertisement

Ranger1230
Joined:
Posts:
1

Create a Session from the command line interface

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Create a Session from the command line interface

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.

Reply with quote

Nonamer
Guest

Keeping a "move files" process open for full day

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Keeping a "move files" process open for full day

Nonamer wrote:

Keepuptodate will not delete from remote site
Use -delete switch

synchronize updates the whole structure, not just one folder.
Use file mask to narrow the synchronization.

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:
https://winscp.net/eng/docs/library

Reply with quote

Advertisement

You can post new topics in this forum