On 7/17/10 5:56 PM, Ken Ray wrote:

The only suggestion I have is to be careful of the "replace comma with cr in
tFiles" line - if there's a comma in the file name you'll get a wrong
result. Also you get a bunch of extra "crap" when you have the full paths to
the files when using "files of folder<folder>".

Try this instead (watch the line wraps):

  function getFiles pFolder
     put revMacFromUnixPath(pFolder) into pFolder
     put replaceText("tell app `Finder`"&  cr&  \
       "the name of every file of folder `"&  pFolder&  "`"&  cr&  \
       "end tell","`",quote) into tScript
   do tScript as "AppleScript"
   put replaceText(char 3 to -3 of the result,(quote&  ", "&  quote),CR) into
tList
   return tList
end getFiles

Thanks Ken, you're right of course. I should have known you'd regex something. :)

Would have replied sooner but we lost our electricity most of last night. I bet the same gigantic thunderstorm hit you too. There was a tornado touch-down just north of here.

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to