William Mead Posted February 27, 2007 Posted February 27, 2007 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?
jamesducker Posted February 28, 2007 Posted February 28, 2007 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
William Mead Posted March 6, 2007 Author Posted March 6, 2007 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
Newbies Jon S Posted March 13, 2007 Newbies Posted March 13, 2007 Huge thanks for this script. Solved a problem in one go!
Recommended Posts
This topic is 6465 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now