Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Easily create HFS-aware PKZIP and unix archives' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily create HFS-aware PKZIP and unix archives
Authored by: SOX on Nov 26, '03 11:06:55PM

thanks!
I've been trying to figure out how to do charater editing and regular expressions in applescript to delete that last slash. Is there a good online ref that teaches apple script? I find either super fcicila things, examples or hideous-to-read reference manuals that make no sense to me.

three things I'm trying to figure out is how to extract the filename from some fully qualified path (that might incude spaces). How to extract the enclosing folder name, again without the path. and how to extract the filename without the suffix or path. (e.g. so I can write something like
[code]
command /path/myarch.bzip2 /newpath/myarch.cpio
[\code]
when given the name /path/myarch.bzip2 I need to be able to create the name /newpath/myarch.cpio
I can do this by calling perl and using regular expressions but there must be some way to do it in applscript directly. plus it gets ugly in perl when there are special chearacters in the file name that need meta-quoting.

any suggestions?



[ Reply to This | # ]