PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 sub-directories 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