PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Moving the file
  • Renaming a directory
  • Renaming a HFSQL file
  • Managing errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Modifies the name of a file.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Windows Mobile
// Modify the name of a file
Res = fRename("\Directory\File.psw", "\Directory\RenamedFile.psw")
Syntax
<Result> = fRename(<Path of the file to rename> , <New file path>)
<Result>: Boolean
  • True if the modification was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Path of the file to rename>: Character string (with quotes)
  • Full path of the file to rename (up to 260 characters). A UNC path can be used.
  • Relative path in relation to the current directory (returned by fCurrentDir).
The wildcard characters are not allowed.
Versions 15 and later
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 17 and later
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
New in version 17
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
<New file path>: Character string (with quotes)
  • Full path of the file with the new name (up to 260 characters). A UNC path can be used.
  • Relative path in relation to the current directory (returned by fCurrentDir).
The wildcard characters are not allowed. The path of the file must exist.
Versions 15 and later
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 17 and later
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
New in version 17
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
Universal Windows 10 App Windows Phone: This parameter corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
Remarks

Moving the file

If <Path of file to rename> and <New file path> contain the same file name but different access paths, fRename moves the file.

Renaming a directory

fRename can also be used to rename a directory. To rename a directory, the directory to rename must be different from the current directory of the application.

Renaming a HFSQL file

To rename a HFSQL file, use HChangeName.
Note: From version 19, HFSQL is the new name of HyperFileSQL.

Managing errors

fRename generates an error in the following cases:
  • the file to rename does not exist,
  • the file to rename is locked,
  • the path of the file to rename is invalid,
  • <New file path> or <Path of file to rename> is an empty string,
  • the new file already exists.
Remark: This function operates on an empty file.
Component : wd240std.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo Renomear Arquivo
b_renomear is boolean=fRename(SAI_Arquivo,SAI_ArquivoNovo)
//frances
b_renomear=fRenomme(SAI_Arquivo,SAI_ArquivoNovo)

mostra_arquivos()

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-arquivos-005-arquivos.html
De matos AMARILDO
Mar. 23 2016