Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27388

VS 2010 add to list files older than 4days

$
0
0
Hello, I need add to list files path older from now than 4days because i wanna use that list on
Code:

Using sr As StreamReader = File.OpenText("list")
e:
i think about this
Code:

        Dim directory As New IO.DirectoryInfo("\\wok\Temp\")

        For Each file As IO.FileInfo In directory.GetFiles
            If file.Extension.Equals(".log") AndAlso (Now - file.CreationTime).Days < 4 Then
                lstDwgList.AddItem(file.DirectoryName)
            End If
        Next

but i dont know its properly

Viewing all articles
Browse latest Browse all 27388

Trending Articles



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