• 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: Really delete a file via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Really delete a file via AppleScript


  • Subject: Re: Really delete a file via AppleScript
  • From: David Durkee <email@hidden>
  • Date: Sun, 3 Aug 2003 11:17:00 -0500

I don't consider myself particularly warned, since you never specified what the "certain program" was. Reminded me of a typical Department of Homeland Security terrorism warning.

By the way, if you haven't deleted the files in the trash yet, there's a good chance they still have their resource forks. I'm not familiar with ditto, but if it's a standard Unix command, most of them don't copy or recognize resource forks. If you have developers tools installed, there's a resource-fork-aware copy command that can copy a directory and keep resource forks, file types, etc. intact. It's in /Developer/Tools, and you might have to specify the full path to the command to use it. I haven't figured out the exact syntax for copying a directory, but I did this:

/Developer/Tools/CpMac -r -p Scripts /Scripts

to copy a Scripts folder in my home directory to the root directory.

David



On Sunday, August 3, 2003, at 10:05 AM, John Delacour wrote:

At 8:48 am -0400 3/8/03, Paul Skinner wrote:

It's rude to empty people's trash without asking.

I might mention, since it's painfully topical for me at this moment, that it's also extremely rude to remove a whole /Users directory to /.Trashes/501, in other words to wipe out say 10 years' worth of personal stuff.

A certain program did just that for me about an hour ago and you can imagine roughly how I felt about that.

If I had panicked, that would have been that. If I had restarted the machine, I would have lost EVERYTHING.

I made a lucky guess and put into practice the tiny bit of UNIX I know. First I did a find in the Terminal looking for a unique filename that I knew I'd lost in the conflagration. This put me onto /.Trashes/501/ and there, sure enough was /jd/ with all its contents.

I then created a folder "Rescued" on my newly wiped out Desktop and typed

sudo ditto jd ~/Desktop/Rescued

That's not the end of it. None of the files moved to .Trashes any longer has a resource fork. That is toasted in the move, so my careful use of ditto to duplicate the files was in vain.

How much I've lost for ever, I haven't yet dared to investigate. At least I've recovered all 350 Mb of mail, even if all the toc resources are up in smoke.

Be warned!

JD



.
_______________________________________________
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.


--
David Durkee
email@hidden
<http://ddurkee.homeip.net/>
_______________________________________________
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: Really delete a file via AppleScript
      • From: John Delacour <email@hidden>
References: 
 >Re: Really delete a file via AppleScript (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Really delete a file via AppleScript
  • Next by Date: Re: Really delete a file via AppleScript
  • Previous by thread: Re: Really delete a file via AppleScript
  • Next by thread: Re: Really delete a file via AppleScript
  • Index(es):
    • Date
    • Thread