Re: Removing resource fork via applescript?
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