cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: How do i differentiating between deleted files and updated files.

How do i differentiating between deleted files and updated files.

michael34254
Explorer | Level 4
Go to solution

When I rename a file or make any other changes to the file such as changing directory, etc, I am getting back two entries when I call list_folder/continue with the cursor. It is becoming difficult for me to differentiate the file changes from the deleted files. Also, the entry with the ".tag": "deleted" doesn't come with an ID to work with. Is there any other way to get around this issue? Am I missing something?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

That's correct, when you move or rename a file, it gets reported as a deletion and addition. Unfortunately DeletedMetadata doesn't include the file ID, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

For files, you can call /2/files/list_revisions with the path from the DeletedMetadata to get the history of the file at that path though, including the file ID(s).

Alternatively, you can store the path and id for the each last (File|Folder)Metadata you saw, so that when you get a DeletedMetadata, you can check what the last known file ID was for that path.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

That's correct, when you move or rename a file, it gets reported as a deletion and addition. Unfortunately DeletedMetadata doesn't include the file ID, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

For files, you can call /2/files/list_revisions with the path from the DeletedMetadata to get the history of the file at that path though, including the file ID(s).

Alternatively, you can store the path and id for the each last (File|Folder)Metadata you saw, so that when you get a DeletedMetadata, you can check what the last known file ID was for that path.

Need more support?