how best to save in DTP for Save As... files

i’ve followed user advise about creating documents from DTP templates, saving them within desired groups, and then opening them in other applications (e.g., word). but i’m not sure how best to quickly save files when i using “Save As…” namely, i’m only allowed to save such files in the global inbox, where there pile up until I return to sort them - and one has to go through the process of closing the document after it has been saved in DTP, and then reopening it.

is there a better process? for instance, is there a folder or trigger script that would be activated whenever saving to the global inbox, in which it would Show Groups & Tags for quicker saving - and maybe also somehow reveal the newly saved Save As… file so one can quickly reopen it within DTP?

or is there another work process that others would suggest? am open to anything.

thank you.

No, other than duplicating the file in DEVONthink first, then editing and saving the new copy.
You can quickly duplicate and rename a file (since it’s already selected).

In fact, Command-D, immediately Enter and rename, then Shift-Command-O will make quick work of this.

thanks. appreciate the prompt reply.

by force of habit, i find it easier to use Save As… from within the app i’m using at the time. i’ll try to rewire how i work, but it feels more laborious to me - i.e., navigating to the particular group from w/in DTP, duplicating, etc. just seems much quicker & easier to use Save As… from w/in the active application - esp. when one is in a rush.

anyway, i’ll give it a shot. was just hoping there might be another, better process for DTP.

thanks.

For versions of DEVONthink that support scripts, it is not difficult to copy and modify one of the included folder actions to open the group selector to prompt for a save destination. I have a folder I call “Prompt Box” with such an action attached. Save As actions can be directed to save there – I included that folder in Finder’s sidebar next to the Inbox. I’ve done this for years to overcome the limitations (from my perspective) of the design of the Inbox.

that sounds like something i’m looking for. quickly: why do you use “Prompt Box” instead of affixing your script to the Global Inbox?

i don’t want to trouble you w/ a blow by blow explanation about how to amend such a script (and which one to use), but would appreciate any pointers you could suggest. i’ve tried my best to to edit scripts, but end up fouling them up in the end. just would appreciate any suggestions.

thank you.

I add my folder action to my “Prompt Box” folder because you should never attempt to add folder actions to the “Inbox” folder associated with the Global Inbox – that will cause problems for DEVONthink.

This script (a modification of one of the included DEVONthink scripts) will not work for DEVONthink Personal – people sometimes use “DTP” to mean that product, hence the caveat.

Copy this. Open in Script Editor. Compile. Save to ~/Library/Scripts/Folder Action Scripts (do not overwrite any of the scripts there). Create a folder. From the Services menu choose Folder Actions Setup… You can find instructions at apple.com for what to do next. Once you’ve attached the folder action to your folder, you can add it to Finder’s sidebar (instructions at apple.com). For my own reasons, my script does not empty my Prompt Box – a task you’ll need to do from time to time.

on adding folder items to this_folder after receiving added_items
	try
		if (count of added_items) is greater than 0 then
			tell application id "DNtp"
				launch
				set theGroup to display group selector
			end tell
			repeat with theItem in added_items
				try
					set thePath to theItem as text
					if thePath does not end with ".download:" and thePath does not end with ".crdownload:" then
						tell application id "DNtp" to import thePath to theGroup
					end if
				end try
			end repeat
		end if
	end try
end adding folder items to

Indeed, it is “quicker and easier” but technologically, it’s infeasible to Save directly to a group in DEVONthink as the groups don’t exist in the filesystem.

When you do a Save As, you have to pick where in the Finder you are saving to.
There is no group in the Finder corresponding to the group you want to save to in DEVONthink (and yes, there are very sound and good reasons why DEVONthink is not built this way), so the only option would be the same folder as the original file, but as I noted, this is a bad thing.

korm’s suggestion is also a good one.

just wanted to think you very much for all of this. it’s far more than i expected, and very generous of you. i did spot a script like this elsewhere on the forum, though i didn’t think it would be appropriate - partly because it exists outside of DTP (and by P i mean “pro”) and thought something within the app would be better.

i also wondered about need to periodically, and if that means i ought to be be constantly double-checking whether the script has successfully saved files into DTP.

anyway, i thank you once again for your generous help with this.

i see. thanks. i’m sure there are well-considered reasons why DTP doesn’t do this already, but i still wish there was some way in which it to could (e.g., having a preference for triggering Show Tags & Groups when putting files into the Global Inbox - or some similar function).

as i said, i like - and greatly appreciate - korm’s suggestion. i guess i’m just a bit nervous about the need to empty the folder, as it seems to suggest that i ought to be be constantly double-checking whether the script has successfully saved files into DTP.

again, i thank you both very much for your assistance.

Looks like I’m going to regret making this suggestion :unamused:

as I said, I do this for my own reasons, and you can change the behavior if you wish.

BTW – big caveat – if you create a Word document and Save As to a folder with this action the document is going to be copied into your database, but Word will still think it is that folder. So if you continue editing the document and Save again and again, the edits will go into the designated folder and NOT into your database. Don’t do that. Do Save As and then Close. To continuing editing, open from DEVONthink.

Word has (and cannot have) any idea what you did with the document in that folder.

This is another reason to use the method Jim described.

no need to regret the suggestion. was just seeking clarity - that’s it.

just out of curiosity, what are your reasons for periodically emptying the folder?

thank you again.

first of all, a big THANK YOU KORM for sharing this solution!

could you give us a hint of how to modify the script so that imported files are mved to the trash in finder?

Look at the included folder action script whose name includes “delete” and apply the deletion code to your own script.