Zip and Unzip files

Advertisement

Advertisement

imperialx
Guest

Hi prikryl,

Forgive me if I didn't understand your reply, are you saying that I can indeed unzip files within WinSCP remotely?

I have this scenario where I zip my files locally then upload the zipped file through WinSCP at my hoster. Once uploaded, I would like to unzipped the file within WinSCP, is this possible?

And where can I input the custom commands?

Thank you for your help.


cheers,
-imperialx

Reply with quote

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

imperialx wrote:

Forgive me if I didn't understand your reply, are you saying that I can indeed unzip files within WinSCP remotely?
Correct. Under some circumstances.

And where can I input the custom commands?
You will find all the details on the page linked in my previous post.

Reply with quote

imperialx
Guest

Hi prikryl,

There is this one list "Zip" under custom commands section with this syntax unzip "!", however, I'm getting this error "Windows cannot find 'unzip'. Make sure you typed the name correctly, and then try again."

I uploaded a zipped file (photo.zip) to remote then select the uploaded zipped file, next, using the custom command dialog, I input this custom command unzip "!" and that is how I get the error.

Did I miss anything?


Thanks,
imperialx

Reply with quote

Advertisement

martin
Site Admin
martin avatar

I suppose you wanted to execute the command on the server side, didn't you? So make sure to select Remote command on the custom command dialog.

Reply with quote

Tracster
Guest

Windows cannot find unzip remote command

I am trying to unzip a file on the remote site, and also get the error message "Windows cannot find unzip" after it copies the files to a temporary location.
Does this command only work on windows servers, as most servers are not run on windows?

Reply with quote

Advertisement

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

Re: Windows cannot find unzip remote command

Tracster wrote:

I am trying to unzip a file on the remote site, and also get the error message "Windows cannot find unzip" after it copies the files to a temporary location.
Does this command only work on windows servers, as most servers are not run on windows?
Make sure you use remote custom command. You seem to be using local custom command.

Reply with quote

Tomas Tobis
Guest

Re: Windows cannot find unzip remote command

Hi Martin. I use WinScp in Windows style mode. I also would like to do zipping/unzipping, but it is horribly hard to do. Also the documentation you pointed to is hard to understand. Can you provide please real steps how to zip/unzip the remote file ? I mean file on FTP server I am connected to.

I tried many things, I tried to edit Custom commands, but then question appeared, how can I use them ? I tried also Commands/Open Terminal and I tried to Execute some commands. No success. I think it is time to show, how this magic really works :lol:

Tomas


P.S.: Wouldn't it be great to have context menu option for zipping/unzipping files ?

Reply with quote

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

Re: Windows cannot find unzip remote command

Tomas Tobis wrote:

Hi Martin. I use WinScp in Windows style mode. I also would like to do zipping/unzipping, but it is horribly hard to do. Also the documentation you pointed to is hard to understand. Can you provide please real steps how to zip/unzip the remote file ? I mean file on FTP server I am connected to.
The custom commands do not work with FTP. Only with SCP and possibly with SFTP.

Reply with quote

CoyoteKG
Guest

Zip command

Hello, I'm trying to zip wordpress site over FTP, and transfer it locally.

I found this command on your documentation, but I don't know how to use it.

zip -r "!?&Enter an Archive Name:?archive.zip!" !&

Please, can you write example, like file name is just backup.zip

Reply with quote

Advertisement

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

Re: Zip command

CoyoteKG wrote:

Hello, I'm trying to zip wordpress site over FTP, and transfer it locally.

I found this command on your documentation, but I don't know how to use it.

zip -r "!?&Enter an Archive Name:?archive.zip!" !&

Please, can you write example, like file name is just backup.zip
You cannot run arbitrary shell commands over FTP session. Only SFTP/SCP.

Reply with quote

RichardHC
Guest

Unzipping made easy

The easiest, fastest, best way to unzip a file on your hosting site is to be sure you zip it recursively so you have the files in their correct folders, upload it by FTP then log into your hosting service C-panel, select the file manager, go to the folder you uploaded the zip file to, select it then click on "extract" - add a path to where you want it unzipped to or just extract it into the root folder of your domain folder. Done. Easy.

Reply with quote

Guest

Re: Unzipping made easy

RichardHC wrote:

The easiest, fastest, best way to unzip a file on your hosting site is to be sure you zip it recursively so you have the files in their correct folders, upload it by FTP then log into your hosting service C-panel, select the file manager, go to the folder you uploaded the zip file to, select it then click on "extract" - add a path to where you want it unzipped to or just extract it into the root folder of your domain folder. Done. Easy.

Six years gone and I was hoping to find some "better" solution than filezilla+cpanel for zipping/unzipping on the server but seems no way :(((
Any good news I missed?

Reply with quote

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

Re: Unzipping made easy

Anonymous wrote:

Six years gone and I was hoping to find some "better" solution than filezilla+cpanel for zipping/unzipping on the server but seems no way :(((
Any good news I missed?
I believe this thread shows the way. Or what are you looking for?

Reply with quote

Advertisement

auto-debilitator
Guest

Transfer & unzip in one step

The use case I have is:

Remote Unix server has gzipped files (1 file per archive). I'd like to be able to pull these files over and unz6ip (locally on my PC) and open in Notepad++ in one step. Unzipping on the remote server isn't an option because I don't have write rights, and I don't want to clutter the server up.

Right now you can right-click a file and choose "Edit". It would be AWESOME if you could right-click a file and choose "Unzip and Edit", where that unzip happened locally, perhaps just in memory, instead of on the server.

Reply with quote

hellreaser
Guest

Zip and upload

Please could you tell me which is the location of the file in Windows that I zip and upload with winscp? Thanks

Reply with quote

Advertisement

Guest

Re: Zip and upload

hellreaser wrote:

Please could you tell me which is the location of the file in Windows that I zip and upload with winscp? Thanks
Please help what happened to the zip file when I do zip and upload above. Where went the zip file after creating ?

Reply with quote

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

Re: Transfer & unzip in one step

auto-debilitator wrote:

The use case I have is:

Remote Unix server has gzipped files (1 file per archive). I'd like to be able to pull these files over and unz6ip (locally on my PC) and open in Notepad++ in one step. Unzipping on the remote server isn't an option because I don't have write rights, and I don't want to clutter the server up.

Right now you can right-click a file and choose "Edit". It would be AWESOME if you could right-click a file and choose "Unzip and Edit", where that unzip happened locally, perhaps just in memory, instead of on the server.
Write a script/extension for that.
It's not difficult.
Your task has many steps common with these extensions/scripts:
https://winscp.net/eng/docs/library_example_verify_file_checksum
https://winscp.net/eng/docs/library_example_zip_and_upload
https://winscp.net/eng/docs/library_example_download_clipboard
https://winscp.net/eng/docs/extension_archive_and_download

Reply with quote

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

Re: Zip and upload

Anonymous wrote:

Please help what happened to the zip file when I do zip and upload above. Where went the zip file after creating ?
What "ZIP and upload" do you refer to?
Do you mean the official "ZIP and Upload" extension?
https://winscp.net/eng/docs/library_example_zip_and_upload
It uploads the file to the current remote working directory.
If that does not work, enable logging in the extension configuration and attach the log here.
(Start a new thread for this).

Reply with quote

Fuana
Joined:
Posts:
3
Location:
Canada

Zip Upload with password to the archive

How can I modify the Zip Upload command to allow the -p parameter to add a password to the archive

Reply with quote

Advertisement

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

Re: Zip Upload with password to the archive

Fuana wrote:

How can I modify the Zip Upload command to allow the -p parameter to add a password to the archive
- Add new runtime @option option
- Pass its value to a new PowerShell param variable
- Pass the variable to 7zip -p switch.

Reply with quote

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

Fuana wrote:

Could you put an example as it is not too clear to me what to add to the command
Thanks
What particular step is not clear?

Reply with quote

apathan
Guest

Unzip file

Hi,
I am trying to unzip files automatically from FTP server using command in WinSCP but I am not able to do so. I want to download that files on my local computer in an unzipped format.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum