Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7345 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have a multiple-file database solution originally developed in FMP3 and recently migrated to v7. I import tab-separated text files to get the data updated. The text files have variable numbers of records and originate on a Windows machine, which I download the data into and then save them to a ZIP file and then transfer them to the Mac for import into FMP7.

I was excited that the "import from a folder" option would allow me to put several text files which were to be imported into a single directory and allow a script to import all the records in all the files in that directory. After modifying my script to import a folder and specifying the import as text, it appeared to work at first glance. But upon checking, it only imported the first record in each file.

The end of line character is 0x0A in the text files. I have tried the "file origination option" as Mac, Windows, DOS and one of the unicodes all with the same results. It only imports the first record (line) of each file and ignores the remaining lines.

It would really save me alot of time if I could get this to work.

Thanks in advance,

Alex

Posted

I believe it will work if you Import 1 as Tab-separated. FileMaker imports text as text, just as it is; which is good if that's what you're doing. But it recognizes returns as record separators if you choose Tab-separated or Comma-separated. I don't think it matters a whole heck of a lot whether it's Windows or Mac returns (at least on a Mac); I tried both settings; they both worked.

The obvious problem is then you have to do several Imports. You could use AppleScript to rename the files one at a time, Import, then rename them back. I've done this and it works. But perhaps a better way, especially if there are a lot of small text files, is to "concatenate" them with AppleScript into 1 text file, then import that.

This AppleScript in the attached file works for me; but YMMV.

TextConcImport7.zip

This topic is 7345 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.