Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

apathan

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.
martin

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?
Fuana

Could you put an example as it is not too clear to me what to add to the command
Thanks
martin

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.
Fuana

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
martin

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).
martin

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
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 ?
hellreaser

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
auto-debilitator

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.
Guest

thx prikryl!
I imagine an easy peasy right-click zip/unzip option (rar, gzip, etc...) :wink:
martin

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?
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?
RichardHC

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.
martin

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.
CoyoteKG

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
martin

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.
Tomas Tobis

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 ?
martin

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.
Tracster

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?
martin

Please read documentation. If that does not help, come back.
imperialx

Hi prikryl,

Under File > Custom Commands, I can't find the Remote command button.

Thanks,
imperialx
martin

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.
imperialx

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
martin

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.
imperialx

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
martin

Re: Zip and Unzip files

Local or remote file? For remote files you can use custom commands.
imperialx

Zip and Unzip files

Is there a feature in WinSCP that can zip or unzip files? Thanks!