Avoid connect time by maintaining session across operations

Advertisement

apurva
Joined:
Posts:
4

Avoid connect time by maintaining session across operations

I have to write a script where I get a listing of the remote directory. Select a few files and then delete them. Then choose some replacement files and put them on the server.

Problem that I face is that each time I have to some string operations in Perl, I have to close winscp connection and then open a connection again. These many opens take around 80% of the script execution time.

Is there a way I can open connection once. Keep moving from Winscp scripts and Perl scripts and then close in the end?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,542
Location:
Prague, Czechia

Re: Avoid connect time by maintaining session across operations

So you need to know results of the previous operation to prepare script for the next? Or why do don't you do in in a single session?
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum