October 29, 200916 yr 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
October 29, 200916 yr 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, 200916 yr by Guest
October 29, 200916 yr updated files... this will parse the tabbed data into its own table. Archive.zip
October 29, 200916 yr 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, 200916 yr by Guest
October 30, 200916 yr Author 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.
October 31, 200916 yr Author 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.
Create an account or sign in to comment