Add POSIX file
before the path to get a file object:
tell application "Finder"
set f to POSIX file "/Users/username/Documents/new.mp3"
if exists f then delete f
end tell
system attribute "HOME"
is replaced with /Users/username
:
set f to POSIX file ((system attribute "HOME") & "/Documents/new.mp3")
tell application "Finder" to if exists f then delete f
Or use the pre-OS X path format:
tell application "Finder"
set f to "Macintosh HD:Users:username:Documents:new.mp3"
-- set f to (path to documents folder as text) & "new.mp3"
if exists f then delete f
end tell