Re: Sending files to the Trash

2003-05-29 Thread Howard Bornstein
>The Trash is a normal folder, just like any other, so if you can work 
>out the path to it, then you can just rename your file to that path 
>instead of using delete.

Thank you Sarah (and Ken). I wanted to find a way to write directly to 
the trash from Transcript. My little utility often has to delete 
thousands of files and I'm guessing that Applescript would be quite  bit 
slower than Transcript.

>  put specialFolderPath("Desktop") into trashFolder
> set the itemDel to "/"
> put ".Trash/" into last item of trashFolder

Under OS 9 I think you have to drop the "." before "Trash/". This looks 
like it will work. Thanks again!

Regards,

Howard Bornstein

D E S I G N  E Q
www.designeq.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Sending files to the Trash

2003-05-29 Thread Sarah
The Trash is a normal folder, just like any other, so if you can work 
out the path to it, then you can just rename your file to that path 
instead of using delete. I have only done this on Mac OS X, but here is 
the method I use for finding the path to the Trash:

put specialFolderPath("Desktop") into trashFolder
set the itemDel to "/"
put ".Trash/" into last item of trashFolder
Cheers,
Sarah
[EMAIL PROTECTED]
http://www.troz.net/Rev/
On Wednesday, May 28, 2003, at 04:49  pm, Howard Bornstein wrote:

Does anyone know a way to move files to the Trash or Recycle bin? The
Delete File command deletes them directly, but if you want to give the
user the chance to retrieve files you delete, it would make more sense 
to
move them to the trash, like a normal OS operation.

Is there a way to do this in Rev?

Howard Bornstein

D E S I G N  E Q
www.designeq.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution






___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Sending files to the Trash

2003-05-29 Thread Ken Ray
Howard,

You can use AppleScript for this:

tell application "Finder"
  move file  to trash
end tell

The key is to make sure you create a proper file path that AppleScript
will accept (i.e. colon-delimited, not "/" delimited like Rev uses). So
for example, my hard disk is named "Stormwinds" and I have OS X running
on it, so my AppleScript would be:

tell application "Finder"
  move file "Stormwinds:Users:kenray:Desktop:Test.txt" to trash
end tell

Hope this helps,



> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Howard Bornstein
> Sent: Wednesday, May 28, 2003 1:43 AM
> To: [EMAIL PROTECTED]
> Subject: Sending files to the Trash
> 
> 
> Does anyone know a way to move files to the Trash or Recycle bin? The 
> Delete File command deletes them directly, but if you want to 
> give the 
> user the chance to retrieve files you delete, it would make 
> more sense to 
> move them to the trash, like a normal OS operation.
> 
> Is there a way to do this in Rev?
> 
> Howard Bornstein
> 
> D E S I G N  E Q
> www.designeq.com ___
> use-revolution mailing list
> [EMAIL PROTECTED] 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Sending files to the Trash

2003-05-27 Thread Howard Bornstein
Does anyone know a way to move files to the Trash or Recycle bin? The 
Delete File command deletes them directly, but if you want to give the 
user the chance to retrieve files you delete, it would make more sense to 
move them to the trash, like a normal OS operation.

Is there a way to do this in Rev?

Howard Bornstein

D E S I G N  E Q
www.designeq.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution