Find and replace strings in the names of selected files and folders in Finder
An AppleScript which does this job is the following:
Recreate the folder and file hierarchy in text form compatible with MediaWiki syntax
With the AppleScript of this post you can create automatically the necessary text, which is for our example the following:
===DevonThink scripts===
Number of files: 0/MBSystem/Users/MB/Downloads/DevonThink scripts/====Camino====
Number of files: 3/MBSystem/Users/MB/Downloads/DevonThink scripts/Camino/Add PDF document to DEVONthink.scpt
Add link to DEVONthink.scpt<br/>
Add web document to DEVONthink.scpt<br/>====DEVONagent====
Number of files: 11/MBSystem/Users/MB/Downloads/DevonThink scripts/DEVONagent/Add PDF document to DEVONthink.scpt<br/>
Add abstracts to DEVONthink Pro.scpt<br/>
Add linked images to DEVONthink’s downloads.scptAdd linked images to DEVONthink.scpt<br/>
Add links to DEVONthink’s downloads.scptAdd links to DEVONthink.scpt<br/>
Add page to DEVONthink.scpt<br/>
Add selection to DEVONthink.scptAdd tabs to DEVONthink.scpt<br/>
Add text to DEVONthink.scpt<br/>
Add web document to DEVONthink.scpt<br/>====Firefox====
Number of files: 3/MBSystem/Users/MB/Downloads/DevonThink scripts/Firefox/Add PDF document to DEVONthink.scpt<br/>
Add link to DEVONthink.scpt<br/>
Add web document to DEVONthink.scpt<br/>====endo====
Number of files: 1/MBSystem/Users/MB/Downloads/DevonThink scripts/endo/Add news to DEVONthink.scpt<br/>
As you can see the folder hierarchy is recreated as a hierarchy of MediaWiki sections. Also the number of files in each folder and its path are added under the name of the corresponding section. If you choose to apply this AppleScript in a folder structure with thousands of files there will no be any problem but it will take a long time to finish. The result is sent to the clipboard.
The AppleScript code is the following:
2011-05-20 I updated the code which creates the POSIX paths of the folders.
How to reveal the front Skim PDF document in Finder and in DEVONthink
You can use the following AppleScript to reveal the front Skim PDF document in DEVONthink:
In order for the last AppleScript to work properly, you need to have the DEVONthink URL in the fourth Skim note of the first page of the PDF in the following form:
x-devonthink-item://648847AF-4714-4328-916C-6169A6389124?page=0
In my post “How to put DevonThink links in Skim note” I describe how this can be done automatically.
Moreover you need to adjust appropriately the name of the DEVONthink database in the line:
tell database “MySources”



