Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2    Statistic  

Files.MoveFile

Moves a file or folder without user interface.

Component: Files
Version: 2.8
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "Files.MoveFile"; SourcePath; DestPath { ; Overwrite; SkipSourcePermissionErrors; ProgressTitle } )

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.
This function needs a native path. Please use Path.FileMakerPathToNativePath function in order to convert a FileMaker style path to a native path.

The Linux implementation does only move files within the same file system.

Examples

Move a file:

MBS( "Files.MoveFile"; "C:\Users\Christian\Desktop\test1.txt"; "C:\Users\Christian\Desktop\test2.txt")

See also


Files.Mount   -   Files.MoveToTrash

Feedback: Report problem or ask question.




Links
MBS REALbasic Plugins - Pfarrgemeinde Ministranten Nickenich