StuffIt question.....

Why doesn’t this work…

set theFile to "Macintosh HD:Users:jkingston:Desktop:MERCK-NOVARTIS-GENETIC-060707"

set theArchive to "NewsPaper:GFX_Transfer:Evans_Brad:MERCK-NOVARTIS-GENETIC-060707.sit"

tell application "StuffIt Deluxe"
	make new archive with properties {location:file theArchive}
	stuff theFile into theArchive
end tell

I can do this do shell script, but the IT guys prefer I use StuffIt. (What they say goes, I cannot get around this.)

All this gives me is a stuffit file with nothing in it.

I’ve been scripting for a while now, but I’ve never scripted stuffit, I think I must be doing something very wrong here…

Hi,

I don’t have StuffIt Deluxe, but it looks like you are trying to ‘stuff’ the text of the path instead of turning it into an alias. DropStuff’s dictionary seems to suggest something like this:

set theFile to "Macintosh HD:Users:jkingston:Desktop:MERCK-NOVARTIS-GENETIC-060707"
set theArchive to "NewsPaper:GFX_Transfer:Evans_Brad:MERCK-NOVARTIS-GENETIC-060707.sit"

tell application "StuffIt Deluxe"
   make new archive with properties {location:file theArchive}
   stuff {alias theFile} to (alias theArchive)
end tell

John M

(Edit: after having looked at DropStuff’s Dictionary)

Makes sense, but I just tried and it doesn’t work.

This program has such awkward error messages, like when I say the ‘make archive’ part, it errors and says it can’t find that file, but it just created it. Why is it looking for that file anyway, it supposed to create it…

Odd. I’ll be in on Sunday to fight with this some more. Thanks for the reply, keep 'em coming.

I don’t use Stuffit Deluxe any more (I prefer to zip), but when I did it was possible to have it stuff something by merely appending the suffix “.sit” to the file name, i.e. if the file was MyText.txt, I changed it to MyText.txt.sit and bingo. Don’t know if that still works.

I don’t have StuffIt Deluxe either. My copy of DropStuff (11.0.2) doesn’t have a ‘make’ command. The act of stuffing creates an archive at the specified location. However, it only works if the ‘to’ parameter is the folder in which the archive has to appear, not the archive file itself. The archive created has the name extension appropriate to the archive type.

set theFile to "Macintosh HD:Users:jkingston:Desktop:MERCK-NOVARTIS-GENETIC-060707"
set theArchive to "NewsPaper:GFX_Transfer:Evans_Brad:"

tell application "DropStuff"
	stuff {alias theFile} format StuffIt to alias theArchive
end tell
--> {file "NewsPaper:GFX_Transfer:Evans_Brad:MERCK-NOVARTIS-GENETIC-060707.sit"}

StuffIt Deluxe is no doubt different, but it might be worth experimenting with a (spare) folder as the destination. :confused: