Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: How to compress a directory with WinSCP using SCP protocol

Thanks for your contribution. I'll add the command to the default custom commands.
minorgod

How to compress a directory with WinSCP using SCP protocol

Here is the command I wrote to tar and gzip a directory. It does not delete the original directory. It prompts the user for the archive name, an exclusion pattern (can be blank) and a directory or filename to compress. You must be using SCP protocol for custom shell commands as SFTP doesn't allow it. You can add this as a custom command:

Description: Compress Directory
tar -czvf "!?&Enter an Archive Name:?archive.tgz!" --exclude="!?&Exclude files matching pattern:?*.exe!" "!?&Specify directory or file to compress:?!"