• 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: Mon, 15 Mar 2004 12:37:25 -0700

on 15 Mar 2004, at 10:12 AM, Doug McNutt wrote:
At 15:11 +0800 3/15/04, Bill wrote:
Anyone has idea how to detect a file has, or hasn't resource fork, by applescript? The environment is Mac OS X 10.3.2, on HFS+.

In my .tcshrc file I have this alias.
alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc

note that the wildcard approach above (disregarding the alias-defining syntax) doesn't work in bash (Apple's default shell), nor the default shell for do shell script (sh?)

this will work in bash, at least for the current directory:

alias rezz='ls -p | grep [^/]$ | xargs -I $ ls -lf $/..namedfork/rsrc'

and this with do shell script:

set f to choose folder
set folder_path to quoted form of posix path of f
set source_part to "find " & folder_path & " -maxdepth 1 -mindepth 1 -type file -print "
set munge_part to " | grep [^/]$ | xargs -I $ ls -lF $/..namedfork/rsrc"
do shell script source_part & munge_part

There are other options to the ls command and it's probably possible to show only the lengths of the forks.

no it's not directly possible -- that's why i piped the fork content to wc in my previous example
_______________________________________________
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.


  • Follow-Ups:
    • Re: How to detect a file has resource fork, or not?
      • From: Walter Ian Kaye <email@hidden>
References: 
 >How to detect a file has resource fork, or not? (From: Bill <email@hidden>)
 >Re: How to detect a file has resource fork, or not? (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: creating events with locations
  • Next by Date: Re: "Save changes to script" when it terminates?
  • Previous by thread: Re: How to detect a file has resource fork, or not?
  • Next by thread: Re: How to detect a file has resource fork, or not?
  • Index(es):
    • Date
    • Thread