Simple delete file not working

(imported topic written by anthonymap91)

Not sure what i am doing wrong; seems simple enough. All lines of the action complete but action fails and file is not deleted.

Thanks

if exist file (“C:\Documents and Settings\All Users\Desktop\Configure Adaptive Log Exporter.lnk”)

delete (“C:\Documents and Settings\All Users\Desktop\Configure Adaptive Log Exporter.lnk”)

else if exist file (“C:\Users\Public\Desktop\Configure Adaptive Log Exporter.lnk”)

delete (“C:\Users\Public\Desktop\Configure Adaptive Log Exporter.lnk”)

endif

(imported comment written by SystemAdmin)

Please test this in the debugger:

if {exist file “C:\Documents and Settings\All Users\Desktop\Configure Adaptive Log Exporter.lnk”}

delete “C:\Documents and Settings\All Users\Desktop\Configure Adaptive Log Exporter.lnk”

else {if exist file “C:\Users\Public\Desktop\Configure Adaptive Log Exporter.lnk”}

delete “C:\Users\Public\Desktop\Configure Adaptive Log Exporter.lnk”

endif