[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] 2 simple queries



At 8:01 AM -0800 4/10/97, Alan Fry wrote:
[snip]
>Paul Schinder <schinder@pjstoaster.pg.md.us> on 10 Apr 1997 08:29:09 -0400
>writes:
>>rename("file","HardDisk:Trash:file");
>
>With respect, that will delete "file", not move it into the TrashCan. On
>this machine at least just <rename "file", "HD:Trash"> will also delete
>"file".
>
>I don't think it is possible to move a file into Trash with MacPerl without
>deleting it. Not that one would want to do it anyway.
>

I think you mean "HD:Desktop Folder:Trash".  The other way just creates a
file named "Trash" on the top level of my harddrive. :)

It seems like "unlink" is the way to go.  The problem with just renaming
the file into the Trash is that MacOS doesn't notice you've done anything.
The file icon will remain wherever it was, but the finder will give you an
error message if you try and mess with it.  Closing and reopening the
folder fixed this, so I guess it's not a big deal.

Brian



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch