Topics
All
Mac OS X
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Guides
Examples
New in version:
8.2
8.3
8.4
8.5
9.0
9.1
9.2
9.3
9.4
9.5
Statistic
Files.MoveFile
Moves a file or folder without user interface.
Component | Version | macOS | Windows | Server | FileMaker Cloud | FileMaker iOS SDK |
Files | 2.8 | Yes | Yes | Yes | Yes | Yes |
MBS( "Files.MoveFile"; SourcePath; DestPath { ; Overwrite; SkipSourcePermissionErrors; ProgressTitle } ) More
Parameters
Parameter | Description | Example value |
---|---|---|
SourcePath | The native path to the file or folder to be moved. | "/Users/John/Desktop/test.txt" |
DestPath | The native path to the destination folder or file. | "/Users/John/Desktop/Backup/" |
Overwrite | Optional Mac only: Whether to allow overwriting existing files. Default is off. Pass 1 to enable and 0 to disable. On Windows, it overwrites always. |
1 |
SkipSourcePermissionErrors | Optional Mac only: Whether to skip files with permission errors. Default is off. Pass 1 to enable and 0 to disable. |
1 |
ProgressTitle | Optional Title for the progress window. For Windows only and the text may not be visible in your version of Windows. |
"Copying FileMake files" |
Result
Returns OK or error message.
Description
Moves a file or folder without user interface.SourcePath and DestPath must be valid and exist. So pass destination folder for the destination.
The Linux implementation does only move files within the same file system.
On Mac you may get error -43 for file not found if you refer to a file in a folder, where you don't have file permissions to look inside the folder.
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.
Examples
Move a file:
MBS( "Files.MoveFile"; "C:\Users\Christian\Desktop\test1.txt"; "C:\Users\Christian\Desktop\test2.txt")
See also
- Files.CopyFile
- Files.ReadFile
- Files.RevealFile
- Files.WriteFile
- Path.FileMakerPathToNativePath
- WebDownloadDelegate.Path
- WebDownloadDelegate.SetFolder
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 8.5pr7
- MBS FileMaker Plugin, version 8.5pr2
- MBS FileMaker Plugin, version 7.0pr3
- MBS Filemaker Plugin, version 2.8pr1
Release notes
- Version 8.5
- Improved error handling for Files.CopyFile and Files.MoveFile.
- Rewrote Files.CopyFile and Files.MoveFile for Mac/iOS to better overwrite files.
- Version 7.0
- Added progress window option to Files.CopyFile and Files.MoveFile for Windows.
Created 18th August 2014, last changed 20th August 2018
Files.MountPath - Files.MoveToTrash
Feedback: Report problem or ask question.

Links
MBS FileMaker Plugins