spotlight comments -> dtpo comments

hello.
i have a lot of pdf not imported (too big) but indexed to dtp.
that pdf are »tagged« with spotlight comments.

is there a way to import those comments to dtp while indexing the pdf folder?

Did you enable the option to import Finder comments in the preferences?

:blush: no. i have to admit i didn’t. shame on me. :blush:

now it works perfectly. thanks.

However, there is one problem: if you change the tags in Finder and then synchronize the indexed files, the updated tags (Spotlight comments) won’t be updated.

  1. If you just change the tags in Finder or Quicksilver or TagBot and not the modification date, the file will be overlooked by the synchronize process. Hence, no updating.

  2. But, and this is problematic, even though file’s modification date is changed, the file is “updated” by DT Pro so that the comments are not updated.

When I noticed that changing just the tags doesn’t work, I thought that “touching” the files would fix the problem and automated this by making an automator action to “touch” the files and assiging it a shortcut. But this does not help. Just the file is updated, not the related Spotlight comments.

I would imagine that case 2 is easy to fix. Case 1 might be more difficult.

Thanks.

The next maintenance release will handle the second case but not the first one (as importing Finder comments is really slow and checking thousands of files could last minutes).

Is it impossible to create scripts like these.
“Copy comments to spotlight comments”.
“Copy spotlight comments to comments”
or,
“Syncronize comments”.

:frowning:

That’s possible but requires some work.

How about adding the option to synchronize Spotlight comments with DT comments (and vice versa)?

I just realize that using a tagging application like Nifty Box (or an app like Slipbox that also writes to Spotlight) does not mean the comments are searchable in DTPO.

Thanks,
Gerben

on recommentFiles(theseRecords)
	local this_record, src_path, this_comments, dest_path, this_type
	tell application "DEVONthink Pro"
		repeat with this_record in theseRecords
			set src_path to the path of this_record
			set this_comments to the comment of this_record
			if length of src_path is greater than 0 and not (src_path ends with ("/" & this_comments)) then
				set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
				set dest_path to ((text items 1 thru -2 of src_path) as string) & "/" & this_comments
				set AppleScript's text item delimiters to od
				try
					do shell script ("mv " & quoted form of src_path & " " & quoted form of dest_path)
					set the path of this_record to dest_path
				end try
			end if
			set this_type to type of this_record
			if this_type is group or this_type is sheet then
				step progress indicator (comment of this_record as string)
				my recommentFiles(children of this_record)
			end if
		end repeat
	end tell
end recommentFiles

I tried to create “Comment to Spotlight Comment” script.
(From bundled script named “Rename External file”.
But it doesn’t work. (filename is changed by the DTPO comment)
Please teach me!
:confused: