ehope1 Posted March 14, 2005 Posted March 14, 2005 I am trying to import data from five .txt files in a folder. If I import them individually the data imports exactly as I would expect. I wanted to import all 5 files at the same time. I specify the folder that these files are in and check the button for text files. My source fields come up "Text Content", "FileName", and "FilePath" instead of the fields that are in the files. What am I doing wrong???
ehope1 Posted March 14, 2005 Author Posted March 14, 2005 I am trying to import data from five .txt files in a folder. If I import them individually the data imports exactly as I would expect. I wanted to import all 5 files at the same time. I specify the folder that these files are in and check the button for text files. My source fields come up "Text Content", "FileName", and "FilePath" instead of the fields that are in the files. What am I doing wrong???
ehope1 Posted March 14, 2005 Author Posted March 14, 2005 I am trying to import data from five .txt files in a folder. If I import them individually the data imports exactly as I would expect. I wanted to import all 5 files at the same time. I specify the folder that these files are in and check the button for text files. My source fields come up "Text Content", "FileName", and "FilePath" instead of the fields that are in the files. What am I doing wrong???
Fenton Posted March 14, 2005 Posted March 14, 2005 When you import from a folder of text files, FileMaker supposes that you are importing ALL the text as one field. Otherwise each line of each file would become another record, which would make imported essays rather hard to read. So it's a special purpose import, much like the its sibling, import picture files. If you want to import a folder of files, as regular tab or comma-separated files, then you need to do multiple imports. There is an automated method, but it requires an external tool, either AppleScript on a Mac, or something like Troi File plug-in on a PC. The logic of the method is the same with either; but it is some work. Setup: [Optional]* Create a folder, named "FilesToImport" or something. Put in a known location. Put all the files in it. Copy one of the files and rename it to a fixed name, like "ImportText.txt" or something (this is just for setting up the file and field order. Setup a FileMaker Import step targetting that file, line up the fields. Operation: Use Troi to get a list of the files in the fixed folder [or pick the folder, then get the list] Take each file name off the list, one at a time Put together each file name with the full folder path to get a full file path Rename the file to the fixed file name (the one you set up for the Import step) Import the file (as comma or tab) Rename it back (or move, or trash; you cannot have 2 files of the same name in the same folder) Do same for next file, to do the rest *If you want to be able to go pick any folder, you can do that. In that case you would Rename-Move the files to the fixed location (renaming and moving a file can be one operation), one at a time. Then Import, then rename-move 'em back where they came from. This sounds slow, but a computer can move a file very fast; it's just changing its location, not copying it. One problem with this method is that you'd have a tough time stopping imports of duplicate files, unless you stopped same-named (but sometimes different files have the same name) or same file path files (but the path changes whenever you move them). You have somewhat the same problem if you import from a fixed "FilesToImport" folder, unless you move the files immediately. I like to have a "Done" folder right beside it, and move each file there after each is imported. If this is on a network, the fixed "FilesToImport" must be in a location accessible to all users. On a Mac this could be the Users:Shared folder. Don't know its equivalent on PCs, but I imagine there is one. I see that Troi can find the "temporary" or "mydocuments" folder on Windows. Troi has lots of example files.
Fenton Posted March 14, 2005 Posted March 14, 2005 When you import from a folder of text files, FileMaker supposes that you are importing ALL the text as one field. Otherwise each line of each file would become another record, which would make imported essays rather hard to read. So it's a special purpose import, much like the its sibling, import picture files. If you want to import a folder of files, as regular tab or comma-separated files, then you need to do multiple imports. There is an automated method, but it requires an external tool, either AppleScript on a Mac, or something like Troi File plug-in on a PC. The logic of the method is the same with either; but it is some work. Setup: [Optional]* Create a folder, named "FilesToImport" or something. Put in a known location. Put all the files in it. Copy one of the files and rename it to a fixed name, like "ImportText.txt" or something (this is just for setting up the file and field order. Setup a FileMaker Import step targetting that file, line up the fields. Operation: Use Troi to get a list of the files in the fixed folder [or pick the folder, then get the list] Take each file name off the list, one at a time Put together each file name with the full folder path to get a full file path Rename the file to the fixed file name (the one you set up for the Import step) Import the file (as comma or tab) Rename it back (or move, or trash; you cannot have 2 files of the same name in the same folder) Do same for next file, to do the rest *If you want to be able to go pick any folder, you can do that. In that case you would Rename-Move the files to the fixed location (renaming and moving a file can be one operation), one at a time. Then Import, then rename-move 'em back where they came from. This sounds slow, but a computer can move a file very fast; it's just changing its location, not copying it. One problem with this method is that you'd have a tough time stopping imports of duplicate files, unless you stopped same-named (but sometimes different files have the same name) or same file path files (but the path changes whenever you move them). You have somewhat the same problem if you import from a fixed "FilesToImport" folder, unless you move the files immediately. I like to have a "Done" folder right beside it, and move each file there after each is imported. If this is on a network, the fixed "FilesToImport" must be in a location accessible to all users. On a Mac this could be the Users:Shared folder. Don't know its equivalent on PCs, but I imagine there is one. I see that Troi can find the "temporary" or "mydocuments" folder on Windows. Troi has lots of example files.
Fenton Posted March 14, 2005 Posted March 14, 2005 When you import from a folder of text files, FileMaker supposes that you are importing ALL the text as one field. Otherwise each line of each file would become another record, which would make imported essays rather hard to read. So it's a special purpose import, much like the its sibling, import picture files. If you want to import a folder of files, as regular tab or comma-separated files, then you need to do multiple imports. There is an automated method, but it requires an external tool, either AppleScript on a Mac, or something like Troi File plug-in on a PC. The logic of the method is the same with either; but it is some work. Setup: [Optional]* Create a folder, named "FilesToImport" or something. Put in a known location. Put all the files in it. Copy one of the files and rename it to a fixed name, like "ImportText.txt" or something (this is just for setting up the file and field order. Setup a FileMaker Import step targetting that file, line up the fields. Operation: Use Troi to get a list of the files in the fixed folder [or pick the folder, then get the list] Take each file name off the list, one at a time Put together each file name with the full folder path to get a full file path Rename the file to the fixed file name (the one you set up for the Import step) Import the file (as comma or tab) Rename it back (or move, or trash; you cannot have 2 files of the same name in the same folder) Do same for next file, to do the rest *If you want to be able to go pick any folder, you can do that. In that case you would Rename-Move the files to the fixed location (renaming and moving a file can be one operation), one at a time. Then Import, then rename-move 'em back where they came from. This sounds slow, but a computer can move a file very fast; it's just changing its location, not copying it. One problem with this method is that you'd have a tough time stopping imports of duplicate files, unless you stopped same-named (but sometimes different files have the same name) or same file path files (but the path changes whenever you move them). You have somewhat the same problem if you import from a fixed "FilesToImport" folder, unless you move the files immediately. I like to have a "Done" folder right beside it, and move each file there after each is imported. If this is on a network, the fixed "FilesToImport" must be in a location accessible to all users. On a Mac this could be the Users:Shared folder. Don't know its equivalent on PCs, but I imagine there is one. I see that Troi can find the "temporary" or "mydocuments" folder on Windows. Troi has lots of example files.
Recommended Posts
This topic is 7195 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