1.11M Members

Filemaker Pro - Multiple File Importing

 
0
 

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

 
0
 

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.

 
0
 

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.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: