Import Multiple txt files to 1 table

memaxt

Registered User.
Local time
Today, 06:11
Joined
Mar 12, 2013
Messages
62
I have used the Application.SaveToText to save each forms source code.

I'm looking to re-import each text file and append it to a table. like below

ID | Object_Name | Script
1 | Form1 | SoruceCode
2 | Form 2 | SoruceCode

I want to automate the process so it imports all txt files in the directory and appends it to my table.

each txt file contains code like this:

Version =20
VersionRequired =20
PublishOption =1
Checksum =-2018790515
Begin Form
PopUp = NotDefault
RecordSelectors = NotDefault
NavigationButtons = NotDefault
DividingLines = NotDefault
AllowDesignChanges = NotDefault
DefaultView =0
ScrollBars =0
BorderStyle =3
PictureAlignment =2
DatasheetGridlinesBehavior =3
GridY =10
Width =7005
DatasheetFontHeight =11
ItemSuffix =13
Left =7395
Top =3165
Right =14400
Bottom =6420
DatasheetGridlinesColor =14806254
RecSrcDt = Begin
0x8ce602c412aae440

etc...

again what I want to achieve is to import all files text files in the same directory and append each txt field to table with its source code saved in memo field?
 
What's your question? How to do this?

Use the filesystem object to read the text of a file into a string and then add it to a new record. Use the Dir function to loop through all files in a directory.
 

Users who are viewing this thread

Back
Top Bottom