I need to make a program in Visual Studio that copy files from one folder to another automatically by today's date. I've this code right here that a friends gives me but I don't know how to make it work. Could someone help me pls?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim lvCreationTime As Date
Dim lvStr_Diretoria As String = ""
lvStr_Diretoria = "C:\"
Dim ficheiros() As String = IO.Directory.GetFiles(lvCreationTime)
For Each file As String In ficheiros
' Do work, example
lvCreationTime = IO.File.GetCreationTime(file)
'Dim text As String = IO.File.ReadAllText(file)
If DateDiff(DateInterval.Day, lvCreationTime, Now) = 0 Then
'file to comunicate
End If
Next
'
'If Not IO.File.Exists() Then
'End If