Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Reading selected files in the end of text file

$
0
0
you guys here already drop a code to read at the beginning of the text file and search for specific data , i try to change the code to adapt to this new project i am doing , and i can not figure out how to do it . It could be simple for you pros here , but for me gets difficult .

last help you guys gave me , was to find a few links under a text where it begins with img and terminates with jpg .
and the code was this one :
Dim LineData As String
Dim LinkData() As String
Dim Link As String
Dim n As Integer


a = App.Path + "\" + "test.txt"
Open a For Input As #1
LineData = Input(LOF(1), #1)
LinkData = Split(LineData, vbLf)

For n = 0 To UBound(LinkData)
If LinkData(n) <> vbNullString Then
Link = Split(LinkData(n), " ")(0)
If LCase(Left(Link, 3)) = "img" And LCase(Right(Link, 3)) = "jpg" Then
List1.AddItem Link
'
' Do your Inet stuff
'
End If
End If
Next n

Close #1
End Sub


now i am doing a new project witch collects data from a server where the name of the files are also mixed with text , i i only want to capture the link in textfiles .

the data in textfile is this :

especifications about how to make something usefull"makesomethinguse.txt","");
data collected from server ocus1 december("decemberfirst15.txt","");
data collected from server ocus1 december("december_last30.txt","");
data collected from server mike1 december("decemberfirst15.txt","");
data collected from server mike1 december("decemberfirst30.txt","");

and goes on and on

i need to catch only the name of the text files , like : makesomethinguse.txt and the others txt name files

a reference that can be used are the last characters , witch are ",""); on every line .
Now , how can i adapt the first code to this text file ?

thanks

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>