Import script from network share: .pdf becomes .pd~

Hi,

Just in case you run into something similar:

To ‘auto-import’ files from a folder to the DT database I added a script to a folder on the network (QNAP NAS).

Looking at my Mac there’s 2 connections to my NAS. One with (I guess) AFP and one with SMB:
Screen shot 2011-04-27 at 14.42.28 .png

Connect to NAS via AFP:


When attaching the script to the first NAS appearance (AFP):

  • most of the imported .pdf files become .pd~ and the kind changes from ‘PDF + Text’ to ‘pdf’. After renaming these to .pdf:
  • I don’t see the extra pages in the page thumbnail list
  • the files are not listed in Smart groups containing ‘kind = PDF/PS’
  • the files do not auto-classify

Connect to NAS via SMB:
Screen shot 2011-04-27 at 14.42.55 .png
Everything works as expected.

Isn’t that strange?

Looks like several instances of backup files or dupes. The names look like scanner-assigned names. In Finder, are there actual differences in the files? Something going on with your scanner?

What this Could be (I’m investigating): when the Scansnap creates the PDF files, it starts out with a temporary .pd~ file. When it’s finished, the file is renamed and ready.

Maybe the script picks up the files before they’re ready!

I’ll add a wait command to the script to see if that fixes the problem.

DJ

Very likely. I’ve run into similar problems with saving from Powerpoint, etc., to Inbox - grabbing a file before it was “ready”.