Delete a file from an arbitrary location
Basically, you use the KILL statement. but there's a profusion of different ways to specify a file in a specific location on the Mac. Probably the best place to start is to see what kind of information you already have to work with.
--- If you have a complete path name for the file (like "Macintosh HD:thisFolder:thatFolder:myFile"), then just specify that in the KILL statement (don't specify the volRefNum% parameter):
KILL fullPathName$--- If you have a working directory reference number for the file's folder (such as the one returned in the vRefNum% parameter of the FILES$ function), then execute KILL like this:
KILL filename$, wdRefNum%--- If you have a true volume reference number plus a directory ID number (these two numbers collectively specify the folder), then do this:
PARENTID directoryID& KILL filename$, volRefNum%--- If the file happens to be in your current default directory, just do this:
KILL filename$There are actually several additional possibilities, but these I think are the most common.