Custom command - zip and download

Advertisement

peterhammer
Joined:
Posts:
1
Location:
Uruguay

Custom command - zip and download

Hi, i would like to make a custom command to zip and download a file in one step.

The zip part is already done, but i dont know if i can append the download instruction...

Any suggestion?

Best regards,
Federico.

Reply with quote

Advertisement

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

Re: Custom command - zip and download

You would have to write a script that opens its own session (to the same host), creates the ZIP and downloads it. The script can also refresh WinSCP GUI file panel when it finishes.

See https://winscp.net/eng/docs/guide_custom_commands_automation

You basically need script like this:
https://winscp.net/eng/docs/library_example_zip_and_upload
Except you have to create the ZIP remotely (using the Session.ExecuteCommand) and download it (using the Session.GetFiles)

Reply with quote

Advertisement

You can post new topics in this forum