Not a big deal, but I am confused and hoping for a little insight.
I store Numbers files inside my DEVONthink databases.
I am trying to understand why I have two versions of a specific numbers file in one of my databases.
If I search the Files.noindex folder in the Finder, I see:
However, when I search within the DEVONthink UI I can only find one copy in my database with name
myFile. However, when I open that document in the Numbers app, then I see the full name of the document:
I can’t find the older
myFile.numbers in the database from the UI and it seems like an orphan, but when I “verify & repair” the database it completes with the result “successfully verified”.
I only stumbled on to this when writing a script checking for the name of this file, before opening it in Numbers, and found the mismatch between the finder name and the name stored in the DT record.
By chance are these Numbers files “indexed” into DEVONthink? I ask as the “-1” is a suffix that Finder would put in when one tries to copy a file into a folder where a file of the same name exists.
I cannot explain while you open “myFile.numbers” from DEVONthink in Numbers and see the filename “myFile-1.numbers”. However, if you have these as “indexed” files, then re-index the folder in DEVONthink might make the new file appear or fixe the name issue. Give it a try.
I’m guessing you’re duplicating indexed files.
Is that correct?
No - I have never indexed anything, all of my files are stored directly in my databases and I see these two specific files in different folders within the Files.noindex folder.
Although these files are stored in the database, they are always edited with the external Numbers app.
I do this on multiple machines and perhaps I got a conflict when these changes weren’t able to sync in a timely fashion? But this is all conjecture on my part.
In any case I still don’t know why I seem to have an “orphan” in the database.
And are you doing a Save As in Numbers?
@pfarrelle Supplementing @bluefrog’s question, Numbers automatically saves file and even by leaving the app the file is saved back where it came from. So doing a “save as” or something like that would duplicate.
I use Numbers files stored in DEVONthink all the time and I never do any sort of “save” as Numbers takes care of it.
In Numbers, if I edit the file, the title shows the document as edited and then I do a regular save from the menu or more likely Cmd-S.
I’m not at my computer now to try this, but I think doing that creates a new file.
Do an experiment and see if you can change your Numbers file, quit Numbers without saving, and then reopen the same file and see if the change was saved.
That’s how Apple’s Numbers works–saves and overwrites the files as they assume that best for you. As I’ve grown accustomed over the years to actually have to save files before quitting, I’ve had to grow newly accustomed to the way the youngsters now do it. Sigh.
Thank you @rmschne for taking the time, you are correct.
I did take a numbers file, stored in DT, opened it in Numbers, made some edits, closed the window without an explicit save, and the edit was saved.
Furthermore, you can then use restore in the Numbers app to revert back to an earlier version, even though the files are stored in DEVONthink.
I have seen “-1” numbers files before which made me a little nervous when heavy editing these key files. I was considering indexing these files thinking this might somehow help, but now I have a much better feeling about what I am doing - thanks again.
Separately @BLUEFROG, any ideas about the other file that I can’t reach from the UI?
In the meantime I will rename this file and keep a closer eye on finder file names in the future.
Just to clarify.
Numbers updates the file stored in DEVONthink continuously, not just when closing the window or app.
I noticed this when I could see both the Numbers window and the sheet in the DT window.
The conflicts setting is:
and yes, I am syncing between two macs and two iOS devices.
I guess that at some time you copied the Numbers file a second time into DT. Maybe after you (accidentally?) deleted the first Numbers file. That can create the files with -1 at the end internally in DT but you only see the original file name in DT. That explains why Numbers opens MYFILE-1.
The original file probably is still in the trash where it’s displayed when you search.
I’ve experienced that behavior several times because I sometimes need to “update” a file from external source. If I don’t delete or move the original file in DT, I end up with the -1 at the file name. However, that happens not always. Sometimes DT seems to store a file (by type) in one internal folder and imports a copy of the same file into another internal folder.
You can simply try and rename the current file and rename it back to the old file name. If the original file is not any longer in the same internal folder as your current file, then it should be renamed in Finder to the name you see in DT.
If you can’t rename the file, check and empty the trash and then rename the file.
I see this if I edit a PDF stored in the global inbox. Anywhere else, including individual database inboxes, no problem.
Actually, for me it’s not a problem at all. I just don’t modify anything in the global inbox with an external application.