Move files
Overview
This task is used to move a specified file to a specified folder.
Syntax
<response> = zoho.docs.moveFile(<fileID>, <folderID>);
where,
Params | Description | Description |
<response> | Variable which will hold the response returned by Zoho Docs. | KEY-VALUE |
<fileID> | is the ID of the file in Zoho Docs which will be moved. The File ID can be viewed in the url when clicked on the file in Zoho Docs. File IDs are also present in the response of retrieveFiles() task and getFiles() task. | TEXT |
<folderID> | is the ID of the folder in Zoho Docs to which the file will be moved. The Folder ID can be viewed in the url when clicked on the folder in Zoho Docs. Folder IDs are also present in the response of retrieveFiles() task and getFolders() task. | TEXT |
Example 1: Move a file from one folder to another in Zoho Docs
The following script moves the specified file to a different folder in Zoho Docs.
response= zoho.docs.moveFile("2cboca937f75ccbf9470191585448baa8d752","0kav58698776c2a8b465f86b5efef876c7d3b");
where,
"2cboca937f75ccbf9470191585448baa8d752"
"0kav58698776c2a8b465f86b5efef876c7d3b"
Response
The success response returned is of the following format:
{
"response":{
"result":{
"message":"DOCUMENT_MOVED_SUCCESSFULLY"
},
"uri":"/files/v1/move"
}
}