• 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: OFF: Help With Drive Rescue...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OFF: Help With Drive Rescue...


  • Subject: Re: OFF: Help With Drive Rescue...
  • From: Peter Bunn <email@hidden>
  • Date: Tue, 17 May 2005 19:51:59 -0500

Dave Balderstone wrote:

>Without knowing what the files are, and moving the thread slightly towards
>on-topic...
>
>What about a script to read the file content and save it out to an
>external drive?


You mean something like:

on open these_items
	repeat with this_item in these_items
		set the_name to text returned of (display dialog "Name This File:"
default answer "")
		set the_read to read this_item to eof
		set write_to to "Saved Items:" & the_name
		try
			open for access file write_to with write permission
			write the_read to file write_to starting at 0
			close access file write_to
		on error
			close access file write_to
		end try
	end repeat
end open

--

Or:

on open these_items
	repeat with this_item in these_items
		tell application "Finder"
			set this_item to this_item as text
			set the_name to the name of file this_item
			set the_creator to the creator type of file this_item
			set the_file to the file type of file this_item
		end tell
		set the_read to read file this_item to eof
		set write_to to "Saved Items:" & the_name
		try
			open for access file write_to with write permission
			write the_read to file write_to starting at 0
			close access file write_to
		on error
			close access file write_to
		end try
		tell application "Finder"
			set the creator type of file write_to to the_creator
			set the file type of file write_to to the_file
		end tell
	end repeat
end open

-----

Both fail on certain files... regardless of size... including those well
within AS's ability.

PB

----------

 _______________________________________________
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

  • Prev by Date: Re: OFF: Help With Drive Rescue...
  • Next by Date: Re: Print text to Terminal
  • Previous by thread: Re: OFF: Help With Drive Rescue...
  • Next by thread: Re: OFF: Help With Drive Rescue...
  • Index(es):
    • Date
    • Thread