Zip cmmand creating Unix Executable

Help! Going crazy. Have read the zip options on the man page 40 times. Using 10.6.7

My script goes like this:

set shellScript to "cd " & thisPosixFolder & "; zip -jm '" & backupArchiveFolder & (thisItemFileName as text) & ".zip' '" & (thisItemPosix as text) & "'"
do shell script shellScript

ScriptDebugger’s fine Variable and Value pane gives me this for the actual command:

cd /Users/admin/Helix-Backups/; zip -jm ‘’/Users/admin/HelixBackups/‘SBT CA 20110725.zip’ ‘/Users/admin/Helix-Backups/SBT CA 20110725’

What happens is that when I unzip it it gives me a Unix Executable file. I want a normal file… It’s apparently owned by admin (me) and uses the Archive helper to unzip it…

If I go to the resulting unzipped file with the terminal I get this:
-rwxrwxrwx 1 admin staff 172196064 Jul 26 15:15 SBT CA 20110725

I think there’s probably an option I haven’t tried. Any ideas? I am so tired of doing it this way and then that way, etc. (Clearly don’t know enough about what I’m doing…)

TIA

Lenny

P.S. IO will add two things I just changed, to no avail. I took off the path from the source file, as I had already cd’ed into that directory… I also noticed that this is a file without a .xyz file type, or any other… a type from the old days…

OK, figured this out. I didn’t realize that it wasn’t a executable issue until last night - its a resource file issue.

It’s been discussed before: http://macscripter.net/viewtopic.php?id=21847 Here is Adam Bells solution…

I’m posting it just in case the other folks who read this post have had similar issues… It’s beyond me that Apple couldn’t make their Archive Helper app scriptable… and that nowhere does it indicate that the zip simply doesn’t work with files that have resource forks.

We solved it by using ditto to a .zip file and using the --rsrc tag, as in: ditto -c -k -X --rsrc that ultimately got everything to work… I hope it helps someone.

Lenny