How to compress a directory with WinSCP using SCP protocol

Advertisement

minorgod
Joined:
Posts:
4
Location:
Tallahassee, FL

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:?!"

Reply with quote

Advertisement

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

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.

Reply with quote

Advertisement

You can post new topics in this forum