PDF naming

If I import a PDF file into DT then change the name, I notice the name does not change in the folder where the file resides (copied to the datatbase folder). Is this correct or am I missing something? I would like it to change in the database folder so if I need to find it , it’s called the same as what’s in DT.

Yes, the PDF file retains its original file name. No problem.

I assume that you selected the Preferences > PDF & Images > Index & Convert option to convert the text of the PDF to plain text.

Show Info for that text file. You will see the Path of the PDF file. The last part of the pathname is the original name of the PDF file. DEVONthink remembered it. You can launch the original file under Preview or Acrobat by clicking on the @ symbol to the right of the Path. When launched, you can also see the name of the PDF file in its title bar.

Or, while viewing the text conversion of the PDF file, choose Actions > Launch Path. The PDF file will open and you can see its file name in the title bar of its window.

Suppose you would like to send a copy of that PDF file as an attachment in an email. Just launch it, choose “Save As” (to the desktop, for example), then choose the copy as an attachment in your email. (Afterward, of course, you can delete the copy you made to the desktop.)

Hope this helps.

Thanks Bill

In the prefs I chose not to convert. I’m using DT as a repository for receipts and invoices and I want to retain the look of the actual item. When I scan, my scanner software defaults to a generic name and number so when I import them I change the name inside DT.

I do see what you mean about using the info box to see the path and the actual file name, which I will now note. But I do kind of wish that changing the name in DT would change the name of the actual PDF I’ve imported. Not like re-saving with a name, but like a Finder rename.

I think Bill misses the point of Jweber’s query. Jweber WANTS to be able to change the document’s OS X filesystem name to the name he has assigned it in DT. DT cannot do this now, and, alas, the missing feature doesn’t seem to be important to the developers.

To me, it’s critically important. I often have to import a bunch of arbitrarily-named PDF downloads to DT, either to the DB folder or as indexed links. I’d like to be able to browse through them in DT, assigning them unique, content-dependent DT names, and have DT automatically rename the files themselves to match. (Naturally, DT would have to enforce the same file naming and pathname-uniqueness constraints that the finder does, but that’s not difficult.)

So why isn’t this the default document renaming behavior? The current behavior is not what a naive user would expect or desire: You can change the DT document name just as you like; however, not only does the new DT name fail to propagate to to the filesystem name, but the DT renaming destroys DT’s link to the file, whether it’s in the database or remains in its original location!

Christian: I don’t know whether this is a poor design choice or just a bug, but I hope you’ll consider fixing it.

I agree that this would be a very useful feature. I have actually gone to the trouble of dragging a pdf out of my database, deleting it from the database, renaming the dragged out file, then dragging it back in. I’m probably a freak, but I can’t stand the sort of disorder created by having the file names in DT not match the file names on disk. It would be absolutely wonderful if you editing a name in DT changed it on disc. If necessary, this could be something that could be toggled on/off in the prefs.

[1] It might be neat to have the option of renaming the PDF in the Finder from DEVONthink. But there could be unintended consequences. For example, I usually name a PDF in DT by selecting the title and choosing the contextual menu option Set Title As. If the title is long, it could break the Finder’s naming conventions.

[2] But it’s important to recognize that renaming a PDF in DEVONthink does NOT destroy DT’s link to the file. Name the PDF whatever you wish in DT, and DT still remembers the original Finder file name and will launch the PDF on command. Of course, if you manually change the PDF file’s name in the Finder, that WILL break DT’s file path to the file. I don’t see a need to do that, since DT is where I do my searches.

When Spotlight comes along in Tiger, the DT developers will have to figure out how to integrate DT and Spotlight features, including files that have different names in DT and in the Finder.

Bill is right, both about possible unintended consequences and about the fact that a link isn’t actually broken unless the linked file is renamed (which, alas, is what I usually want to do).

How about a preference option with two choices of default renaming behavior:

(1) Changing the DT name works as it does now. In particular,
the DT name need not obey filesystem naming rules.
(2) Changing the DT name automatically changes the filename, but the
new DT name must be a valid filename. This can be enforced
in the same way the Finder does it.

Along with this global preference, there should be a contextual menu item
to override the default renaming option on a file-by-file basis.

Christian: Would this be hard to implement?

Best,
step

Or perhaps just adding a “rename linked file” item to the contextual menu that can call up a dialog where you can specify the new name. It could default to the current name it DT.

Version 2.0 will change lots of things, e.g. the operations inside the database will be synchronized with the filesystem automatically and there will be less options and commands (e.g. File > Import/Index/Link To commands and the various copy/don’t copy options will be simplified). This revision will not only simplify the interface and usage of DEVONthink but will result in smaller databases, a smaller memory footprint, compatibility to Spotlight and higher performance too. In addition, this will be also the foundation for search operators similar to the ones DEVONagent already provides.

However, adding another workaround to the existing v1.9.x releases doesn’t make sense anymore but a simple script for DT Pro (more or less complete public beta coming in the first half of March finally) will be able to rename external files.

Hi Christian –

In view of the changes coming up in v2, which kind of importing would you recommend to v1.9.x users who want to make the transition as easy as possible? Is “Index Only” now a better idea than it used to be for PDF files?

Thanks,
step

Due to the number of changes, there’s actually no recommandation but the upgrade process will be as smooth as possible and perform all necessary changes.

So has this naming issue/request been in addressed in the Pro beta?

Jweber:

Yes. There’s a script in the Path and URL group named Rename Files and Folders. It will rename external files and folders to correspond to the names assigned to them in your database. (There’s another script in that group for updating Paths.)

If you’ve kept your database document and group names ‘clean’ (no prohibited characters for filenames) and not too long, this should do what you’ve been asking for.

Caveat: I haven’t tried it yet, because I usually name documents by selecting the title of a paper and using the contextual menu option to assign that as the document name. As I capture many scientific papers, I’ve got some document names that do contain prohibited characters – and some of them are probably too long. So in my case, the renamed files and folders may not correspond exactly to the DT database document names. Most users probably won’t run into having strange characters in their database document names, as I do.

But I will probably make heavy use of this script for handling documents I’ve scanned and run through OCR. One of the systems I’m anticipating using will assign meaningless sequential file names to scanned documents. I will be able to import them into a new DT Pro database, assign meaningful names to the documents, then run the script to rename the PDF files in the Finder. Neat! Once captured, I can export the new material, then import it (merge it) into a content-appropriate DT Pro database (my main database or one containing a specialized topic).

This is a good illustration of scripting enhancements to DEVONthink Pro. Script writers will love it. :slight_smile:

If you didn’t already know, you can download DEVONthink Pro public beta today!

Sounds like what I was looking for. I think I need to take a test drive. BTW what are the prohibited characters? The only thing I ever use as a device is an _underscore.

Colons are prohibited in file and folder names. Some applications won’t accept a slash (/) in a filename.

Scientists and academics love to use colons in titles, so I’ve probably got hundreds of document titles that contain a colon. Some of my documents do have a slash in the title. Others have strange characters that may translate differently in the font used in the Finder for filenames. All this means is that in some instances it will not be possible to exactly duplicate your document’s name in the Finder – but the Finder filename will be meaningful anyway.

Probably Christian has already handled the colon problem in the Rename Files and Folders script – I haven’t checked.

DT Pro (public release) won’t export documents that have a colon in the title. It’s at least true for URLs; I haven’t tested other kinds yet.

sjk:

Thanks for the report. I’ll send a notice to Christian.

I’m one of those people who don’t want to change my external filenames, and I know I’ve got lots of problematic document names in my database, so I can’t check this one out. :slight_smile:
Does that also apply to File > Export > Files and Folders?

I’ve been verifying that bug and a few other issues in the public beta before submitting formal feedback.

That’s where the trouble is. For example, create a URL document for You Control: Desktops 1.1.1, export it to some folder, and an exported file for it won’t exist.

Thank you for the bug report which is only related to the filename handling of Internet locations (e.g. .webloc, .mailloc, … files). Exporting different formats with a colon in the filename doesn’t cause any troubles as a colon is usually a valid character in POSIX paths.

However, DT PE 1.9.4 and DT Pro 1.0p2 will fix this.

Thanks for the quick feedback, Christian.