Try something like this.....

      Function OpenFile(WhichFile As String)
      Dim FileNum As Integer
      Dim fileBuffer As String, tempBuffer As String, tmpString as string
          If Dir(WhichFile) = "" Then msgbox "No File": Exit Function
          FileNum = FreeFile()
          Open WhichFile For Input As #FileNum
          Do While Not EOF(FileNum): DoEvents
              Line Input #FileNum, tempBuffer
'                tempBuffer = "a\sdf\ghj\file=389593452342"
              If Instr(Ucase(tempbuffer),"FILE") Then

tmpstr=right$(tempbuffer,(len(tempbuffer)-Instr(Ucase(tempbuffer),"FILE"))
'                  do something with the result.....
              End if
          Loop
          Close #FileNum
      End Function

HTH,

Lu.



-----Original Message-----
From: B Mihai [mailto:[EMAIL PROTECTED]
Sent: 18 October 2004 05:45
To: [EMAIL PROTECTED]
Subject: PSC DB Parse



Hello. I need help in this coding problem.

I have a database in this format:

a\sdf\ghj\file=389593452342
b\sdf\tkj\file2=12342315098

(i.e. one such entry per line)

There are 3000 such entries and I need the database to
be in the format : file=389593452342 (file=number NOT
file_path=number).

I need to code a VBS or VB6 code to automatically
remove unwanted text.
I am thinking to :

1]split it into lines detecting the vbcrlf
2]scan each line individually in a FOR NEXT loop for
the char "\", deleting recursively the text untill the
begining of the line.
3]pass to the next line

Something similar ... please help me clear out this
problem! Thank you in advance.





_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com



To unsubscribe, send an email to:
[EMAIL PROTECTED]


Yahoo! Groups Links











To unsubscribe, send an email to:
[EMAIL PROTECTED]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5497957.6576270.3001176/D=groups/S=:HM/A=2372354/rand=370267512


Yahoo! Groups Links

Reply via email to