mathieu_cupryk
asked on
Excract a string from a file name KOR_20090210115231.TXT
I need everything after the KOR_
just the date and 20090210
and if this is less than the today's date but seven days then add this file to
Dim reader As New StreamReader(response.GetR esponseStr eam())
Dim line As String = reader.ReadLine()
While line IsNot Nothing
result.Append(line)
result.Append(vbLf)
line = reader.ReadLine()
End While
just the date and 20090210
and if this is less than the today's date but seven days then add this file to
Dim reader As New StreamReader(response.GetR
Dim line As String = reader.ReadLine()
While line IsNot Nothing
result.Append(line)
result.Append(vbLf)
line = reader.ReadLine()
End While
ASKER
This is what I have
If (Path.GetExtension(filenam e).Equals( ".TXT") Or Path.GetExtension(filename ).Equals(" .txt")) Then
' Get files that are older then 7 days
Dim value As String
if (filename contains KOR_ in the 0 to 3 character range ) if this is true
value.Substring(4, 11) '' get the date and compare the date and if less older than 7 days deleteftp file
ZipOperations.DeleteFTPFil e(DeleteFi leName, reqFTPIn.Credentials, ConfigurationManager.AppSe ttings("FT PSite"))
End If
Continue For
End If
Maybe u can help me.
If (Path.GetExtension(filenam
' Get files that are older then 7 days
Dim value As String
if (filename contains KOR_ in the 0 to 3 character range ) if this is true
value.Substring(4, 11) '' get the date and compare the date and if less older than 7 days deleteftp file
ZipOperations.DeleteFTPFil
End If
Continue For
End If
Maybe u can help me.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Error 1 Name 'IsMatch' is not declared. C:\svn\scraper_cingular\co de\Module1 .vb 205 29 ScrapeFilesFromCingular
ASKER
Sorry i made a mistake it is Regex
Did this solve your problem?
Open in new window