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
WINDEVJavaUser code (UMC) The following code is used to modify the name of a file. The file to be renamed and the renamed file are selected with fSelect.
// Declare the variables
FileToRename is string
RenamedFile is string
ResNameModif is boolean
// Select the file to rename
FileToRename = fSelect("", "", "Select the file to rename", ...
"All files (*.*)" + TAB + "*.*" , "", fselOpen + fselExist)
// Select the renamed file
RenamedFile = fSelect("", "", "Select the renamed file", ...
"All files (*.*)" + TAB + "*.*", "", fselCreate)
// 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
Modifying the name of a file (WEBDEV)
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