ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Moving the content of a directory
fMoveDir (Example)
Moving the content of a directory
The following code is used to move the content of a directory. The subdirectories are also moved (frRecursive constant).
// Declare the variables
DirectoryToMove is string
DestinationDirectory is string
ResMove is boolean
 
// Select the directory to move
DirectoryToMove = "C:\DirectoryA"
// Select the destination directory
DestinationDirectory = "C:\DirectoryB"
 
// Move the content of the directory
ResMove = fMoveDir(DirectoryToMove, DestinationDirectory, frRecursive)
// Display an error message if the move was not performed
IF ResMove = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The directory was moved")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/23/2022

Send a report | Local help