Deletes a file.
Adding, duplicating, and deleting records
•Target file is the path of the file to delete. See Creating file paths.
Product  | Supported  | 
FileMaker Pro Advanced  | Yes  | 
FileMaker Go  | Yes  | 
FileMaker WebDirect  | No  | 
FileMaker Server  | Yes  | 
FileMaker Cloud products  | Yes  | 
FileMaker Data API  | No  | 
Custom Web Publishing  | Yes  | 
Runtime solution  | No  | 
FileMaker Pro 18.0 Advanced
Deletes the change.log file.
Delete File [ Target file: "change.log" ]Deletes the change.log file. If the file doesn't exist or another error occurs, the script displays a custom error message.
Set Error Capture [ On ]
Set Variable [ $file ; Value: "change.log" ]
Delete File [ Target file: $file ]
If [ Get ( LastError ) > 0 ]
	If [ Get ( LastError ) = 100 ]
		Set Variable [ $errorMessage ; Value: "The file doesn't exist." ]
	Else
		Set Variable [ $errorMessage ; Value: "Error: " & Get ( LastError ) & ¶ & "The file was not deleted." ]
	End If
	Show Custom Dialog [ $errorMessage ]
	Exit Script [ Text Result: ]
End If
Show Custom Dialog [ "The file was deleted." ]