PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Modifying the name of a file
  • Modifying the name of a file (WEBDEV)
Modifying the name of a file
WINDEVReports and QueriesWindows MobileJavaUser code (UMC) The following code is used to modify the name of a file. The file to rename and the renamed file are selected by 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)
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