Quantcast
Viewing all articles
Browse latest Browse all 27041

VS 2010 add to list files older than 4days

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 27041

Trending Articles