Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any simple way to put file names into the text file?
Message
From
24/01/2008 21:21:22
 
General information
Forum:
Windows
Category:
Computing in general
Miscellaneous
Thread ID:
01285227
Message ID:
01285414
Views:
14
You can add SystemFileWatcher (don't have code sample handy, but simple enough to google) and then you will automatically know which files have changed recently.



>>You successfully baited me.
>>
>>Try this (not tested and not in 2005. There are better ways to do it in 2005)
>>
>>            Dim files() As String
>>            Dim fileList As New System.Text.StringBuilder
>>            Dim myDate As DateTime = Date.Parse("1/22/2008")
>>            Dim fileInfo As IO.FileInfo
>>
>>            files = IO.Directory.GetFiles("C:\", "*.*")
>>
>>            For i As Integer = 0 To files.Length - 1
>>                fileInfo = New IO.FileInfo(files(1))
>>                If fileInfo.LastWriteTime > myDate Then
>>                    fileList.Append(files(i))
>>                    fileList.Append(Environment.NewLine)
>>                End If
>>            Next
>>
>>            Dim writer As New IO.StreamWriter("C:\filelist.txt")
>>            writer.Write(fileList.ToString)
>>            writer.Close()
>>
>
>Thanks, I'll translate into C# on Monday.

(On an infant's shirt): Already smarter than Bush
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform