Components Crossplatform Mac & Win Server Client Old Deprecated Guides Examples Videos
New in version: 9.5 10.0 10.1 10.2 10.3 10.4 10.5 11.0 11.1 11.2 Statistic FMM Blog
Deletes a file directly without moving it to trash.
|Files||3.3||✅ Yes||✅ Yes||✅ Yes||✅ Yes||✅ Yes|
|Path||The native file path to the file to be deleted.||"/Users/John/Desktop/test.txt"|
Returns OK or error message.
DescriptionDeletes a file directly without moving it to trash.
Works also for directories and can easily remove whole directory hierarchies! Be careful and make backups.
Use Files.MoveToTrash to move files to trash which is often better as it allows users to undo the operation. Also Files.MoveToTrash usually works on files in use.
It is possible that the OS decides to not delete the file and fail (e.g. due to permission errors).
Version 6.3 and newer support deleting a list of files. So you can pass a list of paths instead of just one. Stops at the first error.
Warning: If you pass path to a folder hierarchy, the whole folder hierarchy gets deleted!
On Windows you can't delete/move an open file.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Delete a file on desktop on Mac:
Delete a file on desktop on Windows:
Delete two files:
Delete two files on Windows:
- Version 9.2
- Added check to Files.Delete to prevent you using paths ending in // or \\, which may unexpectedly delete a whole folder.
- Query MBS Version from plugin in container
- FileMaker 18 File Script Steps vs. BinaryFile functions
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- FileMaker Server Security and plugins
- MBS FileMaker Plugin, version 6.4pr9
- ImageCapture functions for Mac OS X
- MBS FileMaker Plugin 6.3 for OS X/Windows
- MBS FileMaker Plugin, version 6.3pr5
- Shared FileMaker Server Hosting and Plugin Security
Created 18th August 2014, last changed 23th February 2021
Feedback: Report problem or ask question.
MBS Xojo Chart Plugins