Auto compress files

Advertisement

ks
Donor
Joined:
Posts:
89
Location:
Moscow

Auto compress files

Hi.

Is it possible to set up autopacking downloaded files? For ex., before downloading, run
tar -cvj -f tempfilename.tar.bz !&
for the selected files, then do download the
tar.bz
, then transparently unpack it (or maybe leave as is) with a chosen (local) program.
Both remote and local commands should be configured.
I see it as an extended custom command that applies both remotely and locally.

Point is I do the thing too often manually (pack - download - unpack).

Reply with quote

Advertisement

ks
Donor
Joined:
Posts:
89
Location:
Moscow

Ok, I read the comments, I tried enabling SSH compression but that just didn't change anything - the number of transferred bytes and the speed are the same. Perhaps compression should be enabled at the server.

As for scripting, I wish I could use it but as far as I understand this is only possible with the console version? I cannot run some script commands in an open WinSCP window, can I?

Reply with quote

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

ks wrote:

As for scripting, I wish I could use it but as far as I understand this is only possible with the console version? I cannot run some script commands in an open WinSCP window, can I?
No you cannot, though you can setup a custom command that executes the script for selected files. I'll try to write a guide for that.

Reply with quote

Advertisement

Advertisement

ks
Donor
Joined:
Posts:
89
Location:
Moscow

Thanks, but it didn't work for me. The error message is about
Error: Exception calling "ParseUrl" with "1" argument(s): "SSH host key fingerprint "ssh-rsa-..." does not match pattern ...
But anyway, this all is too complicated, both extensions and automation scripts, especially with the PowerShell popup window. I don't understand why have those - actually, WinSCP can do it all already, and it could do it long ago, but not in one command/click - in 3 or more. I already have toolbar buttons that tar/bzip and tar/gz and so on, also, respective buttons for unpacking. The only thing that is missing - some kind of macroses that allow to run multiple commands at the same time, and the commands should be able to run ON DIFFERENT SIDES (both remote and local).

And archive name should not be entered, it's a temporarily file that should be deleted after unpacking; I should not even see it or know it was there. The real archive name should be something temporary and opaque that doesn't exist in both panels.

The user only has to configure exact commands for packing/unpacking on both sides.
For example, it could be, for downloading:
1. tar -cvj -f arc-tmp-zzz.tbz -- !&
2. "c:\Program Files\WinRAR\WinRAR.exe" x !^!

So, a prospective "Download with compression" button would run the 1st command on whatever is selected on the server side, creating arc-tmp-zzz.tbz, then the archive is downloaded like I double-clicked it, then it is removed from the server, and then the 2nd command would run on arc-tmp-zzz.tbz and the archive is deleted.

The whole thing should work just like downloading with double-clicking, with the only visible difference that the download is faster.

Reply with quote

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

ks wrote:

Error: Exception calling "ParseUrl" with "1" argument(s): "SSH host key fingerprint "ssh-rsa-..." does not match pattern ...
You probably use WinSCP.exe 5.16 but not compatible WinSCPnet.dll.
I'm sending you a download link.

But anyway, this all is too complicated, both extensions and automation scripts, especially with the powershell popup window. ...
Because there's too many things that can be different on different systems. And no way I'm adding zillion options to cover them all. With a script, everyone can modify it according to his/hers needs.

Reply with quote

ks
Donor

You know, I tried to download and upload a 45M file without compression and with it, and it looks like SSH compression does the trick, but even without it, modern internet speed is fast enough to transfer files quickly, so I think this feature is not needed. Sorry for the spent time.

Reply with quote

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

ks wrote:

You know, I tried to download and upload a 45M file without compression and with it, and it looks like SSH compression does the trick, but even without it, modern internet speed is fast enough to transfer files quickly, so I think this feature is not needed. Sorry for the spent time.
It makes no sense to use this to download single large file. SSH compression has the same effect.
But it can improve the performance significantly, when downloading lot of smaller files.

Reply with quote

Advertisement

You can post new topics in this forum