• 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: Removing resource fork via applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing resource fork via applescript?


  • Subject: Re: Removing resource fork via applescript?
  • From: Gnarlodious <email@hidden>
  • Date: Sat, 01 Jan 2005 06:37:55 -0700

Title: Re: Removing resource fork via applescript?
Entity Stephen Jonke spoke thus:

> Is it possible via an applescript to strip the resource fork from
> files? Either directly in applescript, or via command-line (and thus
> doable via applescript)?

Clear resource:


tell application "Finder"
    
try
       set aFile to the selection as alias
   on error
       display dialog "Select a file first"
        error number -128
   end try
   
    set aFile to the POSIX path of aFile
   
    do shell script "cat < /dev/null > " & aFile & "/..namedfork/rsrc"
   
end tell


Clear meta-info:


tell application "Finder"
    
try
       set aFile to the selection as alias
       set aFolder to the container of aFile
   on error
       display dialog "Select a file"
        
error number -128
   end try
   
    set aFile to the POSIX path of aFile
   
    do shell script "cp " & aFile & " " & aFile & "1; mv " & aFile & "1 " & aFile
   
    update aFolder
end tell


-- Gnarlie's Applescript page:
http://Gnarlodious.com/Apple/AppleScript/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Removing resource fork via applescript?
      • From: Stephen Jonke <email@hidden>
    • Re: Removing resource fork via applescript?
      • From: Stephen Jonke <email@hidden>
References: 
 >Removing resource fork via applescript? (From: Stephen Jonke <email@hidden>)

  • Prev by Date: Removing resource fork via applescript?
  • Next by Date: Auto quit script
  • Previous by thread: Removing resource fork via applescript?
  • Next by thread: Re: Removing resource fork via applescript?
  • Index(es):
    • Date
    • Thread