
08/10/2013, 09:37
|
| | Fecha de Ingreso: julio-2012 Ubicación: panama
Mensajes: 19
Antigüedad: 12 años, 7 meses Puntos: 0 | |
Respuesta: Ejecutar evento eh probado con esto pero no ejecuta. no hace nada
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Call moveOldFiles()
End Sub
Sub moveOldFiles()
end sub
Private Sub moveOldfiles(sourceFolderPath As String,
destinationFolderPath As String,
thresholdCreationTime As Date,
Optional fileExtension As String = Nothing)
Dim sourceFolder As New DirectoryInfo("D:\NPRUEBA\bal")
Dim files = sourceFolder.GetFiles(If(String.IsNullOrEmpty(file Extension),
"*.exe",
"*.exe" & fileExtension))
For Each file In files
'Move the file if it was created before the threashold date/time.
If file.CreationTime < thresholdCreationTime Then
file.MoveTo(Path.Combine("D:\ENSAYO", file.Name))
End If
Next
End Sub |