Conditional delete in actionscript

(imported topic written by SystemAdmin)

Hey, folks-

I need to delete a file if it exists using actionscript. if it doesn’t, I want the script to proceed as normal. Here is my delete command:

delete {"C:\" & (if (architecture of operating system = "x86_64") then "program files (x86)" else "program files")} & \Secunia\csi.exe

how can I make this conditional? Still a newbie…

(imported comment written by SystemAdmin)

ActionScript ‘delete’ will delete if present, and if not will continue as its not a true error.