ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Drive functions
  • parameter
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Moves a file on a remote drive from one directory to another.
Example
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"

oDrive is Drive
oDrive = oDriveConnect(oOAuth2Param)

IF DriveMoveFile(oDrive, "/MyDirectories/File.txt", "/Backups/") = False THEN
Error("Unable to move file", ErrorInfo())
RETURN
END
Syntax

Moving a file inside a drive Hide the details

<Result> = DriveMoveFile(<Drive> , <File to move> , <Destination directory>)
<Result>: Boolean
  • True if the file was moved,
  • 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 moved.
<File to move>: Character string
Absolute path of the file to be moved. If this parameter does not correspond to a valid file path, the element will not be moved.
<Destination directory>: Character string
Absolute path of the destination directory. If this parameter does not correspond to a valid path, the element will not be moved. Missing directories in the path are not created.

Moving a file in Google Drive Hide the details

<Result> = DriveMoveFile(<Google Drive> , <File to move> , <Destination directory>)
<Result>: Boolean
  • True if the file was moved,
  • 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 Google Drive service to be used. The connection to the drive must have been previously established. Otherwise, the element is not moved.
<File to move>: GglFile variable
Name of the GglFile variable that corresponds to the Google Drive file to manipulate.
<Destination directory>: Character string
Absolute path of the destination directory. If this parameter does not correspond to a valid path, the element will not be moved. Missing directories in the path are not created.
Remarks

<Destination directory> parameter

Examples of valid paths:
"/holidays directory/2021/"
"\photos"
Examples of invalid paths:
"directoryA/DirectoryB"
"This/Path/Is/invalid"
"c:\Users\"
Related Examples:
Drive functions Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Drive functions Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Business / UI classification: Business Logic
Component: wd290ggl.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/04/2024

Send a report | Local help