Choose where you’d like to start

Move files 

Note: As previously announced, Zoho Docs is being discontinued and the Deluge Docs integration tasks will stop executing starting 15th September 2023. For your advanced file management and collaboration requirements, we recommend you refer to the WorkDrive API documents as an alternative.

Overview

This task is used to move a specified file to a specified folder.

Note: On average, it takes about a minute to index a file/folder after it is created or updated. This indexing time can increase if the queue size increases. You will not get the expected result if you execute zoho.docs.moveFile task before the file you need to move is indexed.

Syntax

<response> = zoho.docs.moveFile(<fileID>, <folderID>);

where,

ParamsDescriptionDescription

<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"
is the ID of the file which will be moved. It is of TEXT data type.
"0kav58698776c2a8b465f86b5efef876c7d3b"
is the ID of the folder to which the file will be moved. It is of TEXT data type.

Response

The success response returned is of the following format:

{  
   "response":{  
      "result":{  
         "message":"DOCUMENT_MOVED_SUCCESSFULLY"
      },
      "uri":"/files/v1/move"
   }
}

Get Started Now

Execute