PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Moving or renaming a file
  • Managing the errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
fMoveFile (Function)
In french: fDéplaceFichier
Moves a file from a directory into another one. The file can be renamed during the move.
Versions 18 and later
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
New in version 18
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Example
// Move a file
Res is boolean = fMoveFile("D:\Example\Win1.wdw", "C:\Temp\Window\Win1.wdw")
Syntax
<Result> = fMoveFile(<Path of source file> , <New file path>)
<Result>: Boolean
  • True if the move was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Path of source file>: Character string (with quotes)
Name and full (or relative) path of the file to move (up to 260 characters). A UNC path can be used. The wildcard characters are not allowed.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
<New file path>: Character string (with quotes)
New name and full (or relative) path of the file (up to 260 characters). A UNC path can be used. The wildcard characters are not allowed.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
Remarks

Moving or renaming a file

If <Path of source file> and <New file path> contain the same file name but different access paths, fMoveFile moves the file.
If <Path of source file> and <New file path> contain different file names and different paths, fMoveFile moves and renames the file.
Remarks:
  • In Windows, fMoveFile is equivalent to fRename.

Managing the errors

fMoveFile generates an error in the following cases:
  • the file to move does not exist,
  • the file to move is locked,
  • the path of the file to move is invalid,
  • <New file path> or <Path of file to move> is an empty string,
  • the new file already exists.
Component : wd240std.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment