ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Deleting a directory
  • Deleting a directory (WEBDEV)
fRemoveDir (Example)
Deleting a directory
WindowsStored procedures
The following code is used to delete a directory. The directory to be deleted can be selected by the user with fSelectDir.
// -- Click code on BTN_DeleteDirectory
// Declare the variables
ResDeletion is boolean
NameDirectoryPath is string
// Select the directory
NameDirectoryPath = fSelectDir("", "Select a directory", ...
"Select the directory to delete")
// Delete the selected directory
ResDeletion = fRemoveDir(NameDirectoryPath, frRecursive)
// Error?
IF ResDeletion = True THEN
Info("The directory was deleted")
ELSE
// Display the error message
Error(ErrorInfo(errMessage))
END
Deleting a directory (WEBDEV)
WEBDEV - Server codePHPAjax
The following code is used to delete a directory.
// -- Click code on BTN_DeleteDirectory
// Declare the variables
ResDeletion is boolean
NameDirectoryPath is string
// Select the directory
NameDirectoryPath = "C:\MyDirectories\DirToDelete"
// Delete the selected directory
ResDeletion = fRemoveDir(NameDirectoryPath, frRecursive)
// Error?
IF ResDeletion = True THEN
Info("The directory was deleted")
ELSE
// Display the error message
Error(ErrorInfo(errMessage))
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/08/2023

Send a report | Local help