Hey everyone, I made a nice little application using Applescript that fulfilled a basic need for my internet browsing. I needed somewhere organized for all my documents that I download from the internet to sit in, instead of being all cluttered on my desktop. When you run the application, it takes all the files and folders in it and moves them to the trash.
Code:
tell application "Finder"
activate
if the folder "Temp" of desktop exists then
open folder "Temp" of desktop
delete every file of folder "temp"
delete every folder of folder "temp"
else
display dialog "There is no Temporary folder present on your desktop. Press Okay for one to be created for you"
tell application "Finder"
make new folder at desktop with properties {name:"Temp"}
end tell
end if
end tell