rename_file
The rename_file function changes the name of a file. Both the current ("old") file name and new file name are specified using their full path, for example, strings or values equal to "D:\\data\\2022-06-14\\data\\my_new_file.txt" and "D:\\data\\2022-06-14\\data\\my_renamed_file.txt. " Note that Windows directory components must be separated by the '\\' or '/' characters.
bSuccess, sMsg = rename_file( sOldPathName, sNewPathName )
sOldPathName is the current full path name of the file.
sNewPathName is the full path name for the renamed file.
bSuccess is true if the function is successful or false if not.
sMsg is an optional message string that recieves information about the failure.
If the current file name does not exist or the target file already exists, rename_file will fail and return false plus an error message. You can use is_file to test whether the file was renamed.
Directory Functions, is_file, make_file, remove_file
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.