Sending files to the Trash
Ken Ray
kray at sonsothunder.com
Wed May 28 11:30:00 EDT 2003
Howard,
You can use AppleScript for this:
tell application "Finder"
move file <filePath> 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: use-revolution-admin at lists.runrev.com
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
> Howard Bornstein
> Sent: Wednesday, May 28, 2003 1:43 AM
> To: use-revolution at lists.runrev.com
> 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
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-> revolution
>
More information about the use-livecode
mailing list