🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

[SOLVED] Importing data from a text file

User: "carl_3"
New Altair Community Member
Updated by Jocelyn
Hi all,
I wonder if someone could give me some advice?  I am looking to import data from a text file based on pattern/text matching. For example process a text file similar to the below, looking to extract the field after "Directory of" and the corresponding text before "File(s)" and bytes.

So based on the file text file below, I would have three records:
PathFilesSize
C:\Windows\addins1802
C:\Windows\assembly145,582,046
C:\Windows\AppPatch\en-US1292,352
Any help or hints would be greatly accepted :)

Carl




Directory of C:\Windows\addins

14/07/2009  06:32    <DIR>          .
14/07/2009  06:32    <DIR>          ..
10/06/2009  22:20               802 FXSEXT.ecf
              1 File(s)            802 bytes

Directory of C:\Windows\assembly

12/05/2012  15:24    <DIR>          .
12/05/2012  15:24    <DIR>          ..
10/06/2009  21:39            66,728 big5.nlp
10/06/2009  21:39            82,172 bopomofo.nlp
10/06/2009  21:39           116,756 ksc.nlp
04/01/2012  04:34         4,567,040 mscorlib.dll
10/06/2009  21:40            59,342 normidna.nlp
10/06/2009  21:40            45,794 normnfc.nlp
10/06/2009  21:40            39,284 normnfd.nlp
10/06/2009  21:40            66,384 normnfkc.nlp
10/06/2009  21:40            60,294 normnfkd.nlp
10/06/2009  21:40            83,748 prc.nlp
10/06/2009  21:40            83,748 prcp.nlp
10/06/2009  21:40           262,148 sortkey.nlp
10/06/2009  21:40            20,320 sorttbls.nlp
10/06/2009  21:40            28,288 xjis.nlp
             14 File(s)      5,582,046 bytes

Directory of C:\Windows\AppPatch\en-US

16/04/2011  03:24    <DIR>          .
16/04/2011  03:24    <DIR>          ..
20/11/2010  13:02           292,352 AcRes.dll.mui
              1 File(s)        292,352 bytes

Find more posts tagged with