5 Replies Latest reply: May 7, 2010 8:33 AM by doug fromoz
logicmania Level 1 Level 1 (0 points)
hello friends,

I need some software like 7 zip for unzipping my archive.. Please help me to find a better one

regards
harilal

Mac OS X (10.6.2)
  • Terence Devlin Level 10 Level 10 (133,120 points)
    http://www.unrarx.com/

    Google is your friend.

    Regards

    TD
  • KJK555 Level 4 Level 4 (2,895 points)
  • Meherally Level 4 Level 4 (1,115 points)
    Hi Harilal,

    I use this http://rarexpander.sourceforge.net/

    works well on SL as well.


    best regards
    Meherally
  • doug fromoz Level 1 Level 1 (0 points)
    The appended Applescript allows you to zip and unzip in-situ in Finder, using an AES-256 password if required.

    I've found this Applescript helpful - it only takes a minute or two to configure on your Mac.
    I wrote it because I needed something to unzip WINZIP AES-256 encrypted files, and I could not get the utilities that are installed on Mac to do the job. I also tried Ez7z, which is very nice, but I had problems getting it to unzip encrypted files. Also, Ez7z is not "in-situ" in Finder, whereas my script is.

    It uses Igor Pavlov's excellent 7zip programme (as does Ez7z), and indeed you can simply install the underlying programme and use it in the Terminal, but that's fiddly and bypasses Finder. I learnt UNIX scripting in the days when Geniuses were still just gurus, and the Applescript reflects that. An old FORTRAN programmer's C++ code will always look a lot like FORTRAN, and I'm sure my script will raise a grin or two. If you, or anyone else reading this can show me how to use the various Applescript components to simply replicate my script I'd be obliged. But in the meantime, I hope the script is useful.

    Doug.

    -- ------------------------------------
    on run
    -- Applescript to use Igor Pavlov's 7zip in the Mac Finder via Services
    -- coded by Doug Fromoz May 2010.
    -- Usage:
    -- In Automator…
    -- open a new Service workflow,
    -- in the Actions > Library pane select "Utilities"
    -- in the Actions sub-pane select "Run Applescript" and drag it into the workflow editor/builder
    -- select drop-downs: Service receives selected "files or folders" in "Finder.app"
    -- paste this whole script into the "Run Applescript" window
    -- then go "File > Save as > 7zip" (saves as a Service)
    -- That completes the installation of the 7zip Service for Finder.
    -- You must also have downloaded & installed Igor Pavlov's 7za programme in /Applications
    -- To then use in Finder, either...
    -- select a .zip file and go "Finder > Services > 7zip",
    -- then follow instructions about AES-256 password if required, etc
    -- or select one or more files and go "Finder > Services > 7zip",
    -- then follow instructions about setting AES-256 password, etc
    -- WARNING: the Service will overwrite existing files without asking permission

    set exe7za to "/Applications/7za" --path to Pavlov's 7zip programme
    tell application "Finder"
    set these_files to the selection --get the files selected in Finder
    if (count of these_files is 1 and the name extension of (item 1 of these_files) is "zip") then --unzip the archive
    set zip_file to (item 1 of these_files) as alias --a collection of 1 files...
    set zip_path to my quote_str(POSIX path of zip_file)
    set question to display dialog "7za. WARNING: existing files will be overwritten. Enter password: (leave blank if none)" default answer "" buttons {"Cancel", "Unzip", "Show First"} default button 2
    set choice to button returned of question
    if choice is equal to "Show First" then --display contents before unzipping
    try
    set outpt to do shell script exe7za & " l " & zip_path & " 2>&1"
    on error error_message number error_number
    display dialog "err msg: " & error_message & "; num: " & number & "; err: " & error_number buttons {"Cancel"} default button 1
    end try
    display dialog outpt buttons {"Cancel", "Unzip"}
    end if
    set pwd_str to text returned of question
    set pwd_flag to my pwdflag_fn(pwdstr) --password, if any
    set folder_name to do shell script "/bin/echo `/usr/bin/dirname " & zip_path &"` 2>&1"
    set folder_name to my quotestr(foldername)
    try
    set outpt to do shell script exe7za & " x -y -o" & folder_name & pwd_flag & zip_path & " 2>&1"
    on error error_message number error_number
    display dialog "err msg: " & error_message & "; num: " & number & "; err: " & error_number buttons {"Cancel"} default button 1
    end try
    display dialog outpt --the raw output message from 7za
    else -- zip the selected files into an archive
    display dialog "7za. WARNING: existing files will be overwritten. Enter password: (leave blank if none)" default answer "" buttons {"Cancel", "Zip"} default button 2
    set pwd_str to text returned of the result
    set pwd_flag to my pwdflag_fn(pwdstr) --password, if any
    set this_file to (item 1 of these_files) as alias
    set file_path to my quote_str(POSIX path of this_file)
    set file_name to name of this_file
    set folder_name to do shell script "/bin/echo `/usr/bin/dirname " & file_path &"` 2>&1"
    display dialog "Name of zip file (.zip will be added!): " default answer file_name buttons{"Cancel", "Continue"} default button 2
    set zip_name to text returned of the result
    set zip_path to my quotestr(foldername & "/" & zip_name & ".zip")
    repeat with i from 1 to the count of these_files
    set this_file to (item i of these_files) as alias
    set file_path to my quote_str(POSIX path of this_file)
    try
    set outpt to do shell script exe7za & " a -y " & pwd_flag & zip_path & " " & file_path & " 2>&1"
    on error error_message number error_number
    display dialog "err msg: " & error_message & "; num: " & number & "; err: " & error_number buttons {"Cancel"} default button 1
    end try
    end repeat
    end if
    end tell
    end run

    --handlers (ie. functions)
    on pwdflag_fn(pwdstr)
    --process the password string. if blank do nothing, else make it a parameter
    if pwd_str is not "" then
    set pwd_flag to " -p" & pwd_str & " "
    else
    set pwd_flag to " "
    end if
    return pwd_flag
    end pwdflagfn

    on quote_str(str)
    --wrap string with quotes to protect it from the shell CLI
    return "\""& str &"\""
    end quote_str
  • doug fromoz Level 1 Level 1 (0 points)
    Hmm, I'm a bit cheesed off that the formatting of the scripting was lost. Anyone know how to preserve that when posting?

    Doug.