|
|
|
|
DriveRename (Function) In french: DriveRenomme
Not available
Renames a file or directory on a remote drive.
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"
oDrive is Drive
oDrive = oDriveConnect(oOAuth2Param)
sNewName is string
sNewName = ExtractString(UncompleteDir(EDT_DirectoryToRename), 1, "/", FromEnd)
sNewName += "_NEW_" + SysDateTime()
IF DriveRename(oDrive, EDT_DirectoryToRename, sNewName) = False THEN
Error("Unable to rename directory", ErrorInfo())
RETURN
END
Syntax
Renaming a file in a remote drive Hide the details
<Result> = DriveRename(<Drive> , <Element used> , <New name>)
<Result>: Boolean - True if the file was renamed,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Drive>: Drive or gglDrive variable Name of the Drive or gglDrive variable that corresponds to the drive to be used. The connection to the drive must have been previously established. Otherwise, the element is not copied. <Element used>: Character string Absolute path of the file or directory to be renamed. If this parameter does not correspond to a valid directory or file path, the element will not be renamed. <New name>: Character string New element name.
Renaming a Google Docs Editors file in Google Drive Hide the details
<Result> = DriveRename(<Google Drive> , <File to rename> , <New name>)
<Result>: Boolean - True if the file was renamed,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Google Drive>: gglDrive variable Name of the gglDrive variable that corresponds to the drive to be used. The connection to the drive must have been previously established. Otherwise, the element is not copied. <File to rename>: GglFile variable Name of the GglFile variable that corresponds to the Google Docs Editors file to be used. <New name>: Character string New element name.
Related Examples:
|
Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
|
|
Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
|
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|