ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Modifying the name of a file
  • Modifying the name of a file (WEBDEV)
Modifying the name of a file
Modifying the name of a file (WEBDEV)
WEBDEV - Server codePHPAjax The following code is used to modify the name of a file.
// Declare the variables
FileToRename is string
RenamedFile is string
ResNameModif is boolean
// Select the file to rename
FileToRename = "C:\MyDirectories\File.txt"
// Select the renamed file
RenamedFile = "C:\MyDirectories\RenamedFile.txt"
// Modify the name of the file
ResNameModif = fRename(FileToRename, RenamedFile)
// Display an error message if the modification was not performed
IF ResNameModif = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was renamed")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/22/2022

Send a report | Local help