February 27, 200719 yr Is there a way to import a folder of PDF files, as you can with images, putting each pdf in a container field? Import folder only seems to let me do pictures and text files. Is there a way to do this with a script?
February 28, 200719 yr If (and only if) you had a list of the filenames in a field (called say "PDFnames"), you could write a script along the lines of: loop set variable [$loops , $loops + 1)] exit loop if [$loops > valuecount(PDFnames)] set variable [$whichPDF , middlevalues(PDFnames,$loops,1)] set variable [$filename , "file:" & $whichPDF] new record/request insert file [containerField , $filename] end loop This, as I say, will only work if you have the list of PDF filenames in a field. If you are using (or can use) a mac, this could be automated fairly easily by running a simple AppleScript to "get the name of each item of folder xxxx" before doing the routine above. I'm not sure how to do this on Windows, but a question in the Visual Basic/ActiveX section would probably not be a bad idea. Good luck! James
March 6, 200719 yr Author James, thank you for your response! That is very helpful. A friend of mine who is a good programmer whipped up a nice little solution too. It also requires applescript and therefore must run on a mac. This solution has one very simple (but beyond my programming skills) script that basically works just like the import -> folder of images function in the Filemaker File menu. You run the script and it prompts you to pick the folder then puts the files in a container field and the names of the files in a text field. I am attaching the file with his fully functional example with his permission. It is for version 7 and up and completely unlocked and available for study. I hope this thread is useful for someone else. PDFTest.zip
Create an account or sign in to comment