• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to detect a file has resource fork, or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect a file has resource fork, or not?


  • Subject: Re: How to detect a file has resource fork, or not?
  • From: steve harley <email@hidden>
  • Date: Wed, 17 Mar 2004 12:42:47 -0700

on 16 Mar 2004, at 2:36 AM, Chris Janton wrote:
warning - gratuitous use of "cat"

You can simply state the above command as

"wc -c " & res_path

yes of course, thanks

try
do shell script "test -s ~/foo/..namedfork/rsrc"
on error errMsg number errNum
{errMsg, errNum}
end try

"test -s" returns true if a file exists *and* has a size greater than 0

at the shell level that is cleanest.. but in applescript terms it either returns nothing or it raises an error.. that reflects a deficiency in do shell script more than anything else
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: How to detect a file has resource fork, or not? (From: Chris Janton <email@hidden>)

  • Prev by Date: Re: do shell script "perl... " to find/replace in a string
  • Next by Date: Re: osascript and Modification Date of Compiled Script
  • Previous by thread: Re: How to detect a file has resource fork, or not?
  • Next by thread: creating events with locations
  • Index(es):
    • Date
    • Thread