Chat etc.

This commit is contained in:
ms
2020-05-12 14:55:03 +02:00
parent 46a9991b2a
commit be5014153d
54 changed files with 1993 additions and 263 deletions

View File

@@ -1,5 +1,6 @@
Imports System.Data.SqlClient
Imports System.Reflection
Imports System.IO
Public Class Class1
@@ -819,4 +820,25 @@ Public Class Class1
'returnTable = dv.Table
Return returnTable
End Function
Public Shared Sub CopyDirectory(ByVal sourcePath As String, ByVal destinationPath As String)
Dim sourceDir As DirectoryInfo = New DirectoryInfo(sourcePath)
Dim sourceFiles As FileInfo() = sourceDir.GetFiles(sourcePath, "*")
For source As Integer = 0 To sourceFiles.Length - 1
Dim destinationDir As DirectoryInfo = New DirectoryInfo(destinationPath)
Dim destFiles As FileInfo() = destinationDir.GetFiles()
For destination As Integer = 0 To destFiles.Length - 1
If File.Exists(Path.Combine(destinationPath, sourceFiles(source).Name)) Then
If sourceFiles(source).Name = destFiles(destination).Name Then
If sourceFiles(source).LastWriteTime > destFiles(destination).LastWriteTime Then
sourceFiles(source).CopyTo(Path.Combine(destinationDir.FullName, sourceFiles(source).Name), True)
End If
End If
Else
sourceFiles(source).CopyTo(Path.Combine(destinationDir.FullName, sourceFiles(source).Name), True)
End If
Next
Next
End Sub
End Class