Indexing is Deleting Files I Need to Keep

Hi - I am beginning to use indexing to link my DropBox files. However, I noticed on a DB folder I just indexed, DT is trashing several files that I need to keep. When I try to reinstate the trashed file, it is highlighted in blue and then goes to trash again. What am I doing incorrectly? Is there a setting that I am missing? FYI, there are similar files (Excel) that DT is not trashing so I am at a loss as to why it is trashing some but keeping others. Thank you.

When you say trashing, is the file removed from indexing, oder actually removed from the source too? My first suspicion would be that you have a smart rule or script active which is too broad in its actions - is that possible?

No. I would assume that they will not be removed from DB until I empty the DT trash.

Was that a no to possible script/rule actions too?

Are you using Dropbox’s Smart Sync feature? If so, you might want to see Jim’s input on that topic

A script or rule in DB? No.
Not sure about DB Smart Sync. How would that affect DT indexing?

no, in DT.

it is highlighted in blue and then goes to trash again.

The change to blue sounds like it’s being detected as a duplicate and moved to the database’s Trash via the Filter Duplicates smart rule. Double-click it to make sure it’s set to On Demand or Control-click it to remove the rule.

1 Like

I wondered about that, but would expect the text to turn blue rather than be highlighted blue?

Trying to find where to edit any rules…

Text did turn blue; sorry for the confusion.

in the navigate sidebar you will find a heading “Smart Rules” - if you don’t see any rule there then hover over the right edge of the sidebar at the level of the “Smart Rules” heading - “Show” will appear - select “Show”.

Oh, and you might want to try the “Stricter recognition of duplicates” setting under the “General” header on the DT preferences.

Any suggested changes? Screen Shot 2020-10-01 at 10.56.43 AM

OK - “Stricter recognition of duplicates” seems to help…

Yeah, that’s the problem - two possible solutions: change that to “On Demand” rather than “After Synchronization” and/or activate the “Stricter recognition of duplicates” preference I suggested above; that may mean that files which are currently erroneously being recognised as duplicates (if it is an error) are no longer recognised as such. I must admit I’m wary of smart rules which delete files without my input. I would at least add feedback to that (I’ll post a simple script in a moment)

1 Like

I use the following script (as a smart rule action with Execute Script - Embedded) for any rules which automatically delete files:

on performSmartRule(theRecords)
	tell application id "DNtp"
		set recCounter to 0
		set delDocs to {"
"}
		repeat with theRecord in theRecords
			set recCounter to recCounter + 1
			set listName to ("
" & the name of theRecord)
			copy listName to end of delDocs
		end repeat
		if recCounter is greater than 0 then
			set theDialog to ("Moving " & recCounter & " documents to trash: " & delDocs)
-- Possibly use name of the rule e.g. "Delete Duplicates Rule" instead of "Deleting documents" as title; that way rule is easier to identify 
			display dialog theDialog with title "Deleting documents" buttons {"Cancel", "OK"} default button 1
			repeat with theRecord in theRecords
				set thisDatabase to the database of theRecord
				move record theRecord to trash group of thisDatabase
			end repeat
		end if
	end tell
end performSmartRule

The script is used instead of the “Move To Trash” action.

Thank you for the help!

1 Like

You’re most welcome :slight_smile: