944,127 Members | Top Members by Rank

Ad:
Apr 20th, 2006
0

Filemaker Pro - Multiple File Importing

Expand Post »
HI Everyone,

I have recently joined this site because I cannot find help anywhere online about FileMaker Pro (without a charge, that is).

Every month I import about 80 excel files from 1 file folder. In order to do so, I have to individually import each file into my database.

Does anyone know of a way to import the whole folder so that I only have to import once a month, instead of 80 times?!

If it matters, I have FMP v.8

Thanks,
Sybil
Reputation Points: 10
Solved Threads: 0
Newbie Poster
svarghe is offline Offline
1 posts
since Apr 2006
Jun 5th, 2006
0

Re: Filemaker Pro - Multiple File Importing

Yes, there is a way to acocmplish what you want.

Assuming that you are importing text files (literally, files ending in .txt), you can use the Import Folder... command to obtain the list of 80 files that must be imported. Then once you have this list you can use a script to step through each item and perform the individual import of the data in that file.

When you use the import folder command, there are actually three items available for mapping to fields: the content of the file; the file name; and the full path to the file. You do not want to import the field contents or file name, just the full file path. You'd create a new table, "ImportToDo" for example, to hold those file paths.

After you do this "Import Folder" step, you will have a table with one record per file. You then Loop through each record, using the contents of the filePath field to direct subsequent, standard, file imports.

A script off the top of my head for this would be:

Go to Layout ["ImportToDo"]
Import Records [###; Include all enclosed folders; Text files]
Go to Record [First]
Loop
Set Variable [$currFile; Value:ImportToDo::filePath]
Go to Layout ["Destination Table"]
Import Records [No Dialog; "$currFile"]
Go to Layout ["ImportToDo"]
Go to Record [Next; Exit after last]
End Loop

where ### is replaced with the folder where you usually save these 80 text files, or left blank if you wish to specify the folder each time you run the script.

I hope this helps...

p.s.: the usenet newsgroup comp.databases.filemaker is free and has a very high participation level. I'm not trying to plug another website, but I've noticed most of the FileMaker-related inquiries here either get no answer or a "use MySQL" type of answer. Good luck.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MerryOtter is offline Offline
4 posts
since Jun 2006
Jun 5th, 2006
0

Re: Filemaker Pro - Multiple File Importing

Aha, I just re-read your post and see you're using Excel files. The Import Folder command I suggested works only with .txt and image files. However there is still a way to do this; you would use either the Send Event or DDE Execute script step (or just run a DOS .bat file with the DIR command to put the list of files into a txt file). Then you'd open the file list and process it as above. Note, there are also many plugins available to handle the file system from within FileMaker.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MerryOtter is offline Offline
4 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Access subforms and Filemaker Pro
Next Thread in MS Access and FileMaker Pro Forum Timeline: Access If, Then, Else statement - HELP!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC