Jump to content

Can't import tabbed txt files from a folder in different revords


Recommended Posts

  • Newbies
Posted (edited)

I used FM since it wasn't an Apple-Claris app and I was always able to import in different records the various files ending with "TXT" e placing  them in different field based on the tabs each file contained. The Carriage Return opened a new record and repeat the import based on the tabs. This until FMP found fies in the selected folder-

Now I receve the options of 3 fields only:

Content

Name

Path

The content contains everything still I can read the various needed tabs but even if the first line has the correct names everything is just one enormous text file. The carriage return end the import and all other files remain in the original folder.

How to import every file in a folder e allow fMP to place each data separated with tab into its specific field them continue with the next file til the end of the folder?

Thanks. Yo me is a serious problem as to import files one by one takes forever and I have 350 students to take care off and they all send me their work I need to evaluate

 

Edited by thedkey
errors
Posted (edited)
11 hours ago, thedkey said:

How to import every file in a folder

To import every file in a folder individually you need to start with a list of the file paths. You can get such list by importing the folder (as you seem to be doing now) into another table. Alternatively you could use the BaseElements plugin.

Next you need a script to loop over this list and import each file into the target table. If you have files from 350 students you will probably want to follow each import by populating a field with the file's name so that you know the origin of each record.

Finally you will need some mechanism to prevent importing the same file twice. We don't have enough details to suggest the best method for this. Perhaps you could simply move the imported files manually out of the source folder.

 

Edited by comment
  • Newbies
Posted (edited)
On 1/19/2025 at 8:39 AM, comment said:

To import every file in a folder individually you need to start with a list of the file paths. You can get such list by importing the folder (as you seem to be doing now) into another table. Alternatively you could use the BaseElements plugin.

Next you need a script to loop over this list and import each file into the target table. If you have files from 350 students you will probably want to follow each import by populating a field with the file's name so that you know the origin of each record.

Finally you will need some mechanism to prevent importing the same file twice. We don't have enough details to suggest the best method for this. Perhaps you could simply move the imported files manually out of the source folder.

 

 

On 1/19/2025 at 8:39 AM, comment said:

 

 

Thank you very much for your kinfness- However I only used FMP in a rather simple way, creatung simple scripts and connecting different files at the very most...  therefore is hard for me to follow yoour suggestio as for using BaseElements because I am not familiar with the various options and language in that site.

I imported the various files in a new table which took the name of the folder where I kept the files of my students work and this is the result just like before:
 

I add here my FMP FILE and the zipped original folder. I removed all the text for privacy reasons. However as you will see each first file has the same fields name separated by tab.

What shall I do to get the content of the tabbed files in the main or a new tanle or even a brand new FMP file keeping the varioujs fields separated?

test.fmp12

lugòplj.zip

 

Edited by thedkey
erroros

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.