June 13, 200520 yr Howdy All, I was wondering what the best way to import lots of excel files was? I mean without the user having to go in and import each one manually. Any ideas?
June 14, 200520 yr That sounds like a job for "Automator" (Mac OS 10.4) Have you messed around with the "Import" script step? It might speed things up a bit, but it will only import one .xls file at a time. You can then create a new record in the script and import a second .xls file, and so on. If you have 100 files all with different names it is a problem since you have to specify the file names in script but you can't automatically increment the file names.
June 14, 200520 yr This question gets asked fairly often, in various forms. If the poster is on a Mac, you can use AppleScript, if on a PC, probably Troi File. Either can use command line, but that would be more difficult. Look at this post: http://www.fmforums.com/threads/showflat...true#Post151659
June 14, 200520 yr Author So really there is not easy way. I read the other post and checked out Troi but it still seems likes its all being done manually. I thahnk you for the repely, but i still find no way to take 50+ text files and import all of them. I really was hoping that import folder would do it, but no, all it does is import the Full name, Full Path ect., I believe that to be rather pointless. Is this the absolute end for my search? Thanks again, Akira EDIT: Or it might just be that i don't understand how to use Troi. If thats the case please help
June 14, 200520 yr Well, the Troi examples are basic, there is not an "import files from folder" command per se. But there is a "Listing Folder" example (button on the All File Examples file, Getting Data In tab), which opens the ListFolder file, where the example is. The Troi command: TrFile_ListFolder You can bring that list of the names of all files in the specified folder into FileMaker, as a return-separated text field (global). Then it's a matter of taking them out, 1 line at a time, adding the folder path, to get a full path, renaming that file to a fixed name, using the Troi: Tri_MoveFile command (moving and renaming a file are much the same thing; FileManipulation example file). You can then Import that file, then move/rename it again. Repeat until done. So it can be done. It's not all that easy, but it's not all that hard either; once you understand the basic logic, which was in my referenced post. I've mostly done this with AppleScript. I probably have a Troi-based routine in one of my files, somewhere, but I don't have a simple example handy. [bTW, you have 2 threads going about this. Please don't double-post. It makes it hard for others to follow the discussion.]
June 15, 200520 yr If you want to see how a real expert does this (for free), check out this comprehensive how-to by Matt Petrovsky posted today on his site's bulletin board. Command line made easy (well comprehensible anyway), cross-platform no less. A must read for FileMaker geeks: http://forum.filemakermagazine.com/about6535.html
Create an account or sign in to comment