Tuesday, January 17, 2017

#1 2007-03-03 11:58:59 pm

Kevin Bradley
Administrator
From: Independence, MO
Registered: 2006-03-13
Posts: 548
Website

Using a try block to move files

This code uses a "try" block when moving a file. On an error it will display a dialog to the user. Pulled from the AppleScript Users list.

Applescript:

try
move aFile to folder destFolder
on error -- oops, couldn't move the file
display dialog ("Couldn't move " & name of aFile as string) buttons {"OK"}
end try


Nitewing '98
--
I distrust morning people, largely because I suspect them of getting together early one day while the rest of us were asleep and setting up the rules of civilization.

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.048 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)