password protecting gzip files created in Applescript

Hi,

I’ve got a backup script which copies, then gzips a file, and then uploads it to our web server using Cyberduck. I was wondering if it’s possible to make the gzip file so it requires a password to open? Here’s the gist of the gzip part of the script:

tell application “Finder”
duplicate the file “Users:Home:Desktop:XXX.fp7”
set theObject to POSIX path of file “Users:Home:Desktop:XXX copy.fp7”
do shell script "gzip " & “"” & theObject & “"”
end tell

the gzipped file is then sent to our webserver via cyberduck. Although access to our webserver is controlled via username and password, I would like to further secure the gzip file with a password of its own.

Cheers,

Kev.

Browser: Safari 312.6
Operating System: Mac OS X (10.4)

Hi Kev,

gzip doesn’t provide an encryption option, but zip does

Hi Stefan,

Can you point me in the right direction. I’ve been looking on the web, and in the man pages for the zip command, but haven’t turned up anything. Merely substituting zip for gzip in the script doesn’t work.

Cheers,

Kev.

Hello all,

I’ve given up on zip files. However DropDMG lets you encrypt files and folders in a variety of formats.

tell application “DropDMG”
set d to “/Users/Home/Desktop/XXX”
– XXX is the file to encrypt –
create image from path d configuration name “YYY”
– YYY is the encryption setting with password –
end tell

Cheers,

Kev.