Guys,
I have coded an app where a user can either choose or drop a folder for processing. Now sometimes the folder can be zipped. I want the app to check if the dropped item is a zip file or not. If it is a zip file, unzip and then process the folder contents. So, basically if the file named “myFolder.zip” is dropped on the app, it should be unzipped and the resulting folder “myFolder” should be processed.
This is how far I have gotten:
on open the_bundle
set typeF to info for the_bundle without size
set theFileKind to kind of typeF
if theFileKind is equal to "ZIP Archive" then
display dialog theFileKind
-- unzip this file
-- get the folder and use it for processing
end if
end open
[EDIT]: I got it to where I can test if the dropped item is a zip file or not. How do I unzip the file and get the folder for further processing