LongJohn Posted October 29, 2009 Posted October 29, 2009 I have on a regular basis to import .txt files generated by a Barcode scanner. The steps used are: 1: Import Folder to get the list of filenames and the path. 2: A looping script to work thru the file paths to Import File with fields appropriately assigned. Unfortunately this does not work as I get error 100 and message that "The "File xxxx" could not be found and is required to complete this operation" . A finder window then opens showing the list of files and a double click effects the importing. Why does this not occur from the script. FileImport.pdf
Ocean West Posted October 29, 2009 Posted October 29, 2009 (edited) Welcome to the forum, you may need to introduce a pause in your loop as filemaker may not have enough time to recover from the import process as some files may take longer than others. You may consider using 360Works ScriptMaster plugin for this to perhaps have more consistent results. http://www.360works.com/scriptmaster/ After you install the plugin you may try this file ( designed for a Mac OS ) run the 2nd Script to choose the the directory, run the 3rd script to import the contents of directory, each file in to a record. there is a sample folder with 3 txt files of 5000 lines each. import.fp7.zip txt.zip Edited October 29, 2009 by Guest
Ocean West Posted October 29, 2009 Posted October 29, 2009 updated files... this will parse the tabbed data into its own table. Archive.zip
Søren Dyhr Posted October 29, 2009 Posted October 29, 2009 (edited) The steps used are: 1: Import Folder to get the list of filenames and the path. 2: A looping script to work thru the file paths to Import File with fields appropriately assigned. Unfortunately this does not work as I get error 100 and message that "The "File xxxx" could not be found and is required to complete this operation" . I think you make it a bit more difficult than it really is: http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=859&p_created=1115172476&p_topview=1 Only real requirement is the folder only contains the text files.... To get the content of the imported file digested would you be able to make a variation over: http://edoshin.skeletonkey.com/2006/12/crosstab_report.html Utilizing these two: http://fmhelp.filemaker.com/fmphelp_10/en/html/func_ref3.33.74.html http://fmhelp.filemaker.com/fmphelp_10/en/html/func_ref3.33.77.html --sd Edited October 29, 2009 by Guest
LongJohn Posted October 30, 2009 Author Posted October 30, 2009 Thank you all for your suggestions. I will need time to work thru them and hopefully find a working solution. I can at this stage comment that quickly using the 360Scripmaster Plugin and function Confirm Existence of files gives the same not found message as in my method. However as said I need to work on each suggestion.
LongJohn Posted October 31, 2009 Author Posted October 31, 2009 Thanks Ocean West, I have adapted the offering made in Archive.zip to meet my data format need including using the .cvs files generated by the barcode scanner. Viewing the various solutions from others has also helped my thinking re use of FM functions and external functions. Great learning.
Recommended Posts
This topic is 5502 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