neu
This commit is contained in:
@@ -150,6 +150,7 @@ Public Class cProgrammeUpdate
|
||||
If Not My.Computer.FileSystem.DirectoryExists(sourcePfad) Then
|
||||
MsgBox("ERROR_COPY_01: Quell-Ordner existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
|
||||
End If
|
||||
' MsgBox(destPfad)
|
||||
If Not My.Computer.FileSystem.DirectoryExists(destPfad) Then
|
||||
MsgBox("ERROR_COPY_02: Ziel-Ordner existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
|
||||
End If
|
||||
@@ -167,15 +168,15 @@ Public Class cProgrammeUpdate
|
||||
If LIST_SOURCE.Count = 0 Then
|
||||
MsgBox("ERROR_COPY_01: Quell-Daten existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
|
||||
End If
|
||||
If LIST_DEST.Count = 0 Then
|
||||
MsgBox("ERROR_COPY_02: Ziel-Daten existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
|
||||
End If
|
||||
'If LIST_DEST.Count = 0 Then
|
||||
' MsgBox("ERROR_COPY_02: Ziel-Daten existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
|
||||
'End If
|
||||
|
||||
'ORDNER erstellen:
|
||||
For Each f In LIST_SOURCE
|
||||
If If(f.pud_filePathFolder, "") <> "" Then
|
||||
If Not IO.Directory.Exists(dirNameReplace_DEST & "\" & f.pud_filePathFolder.Replace("\\", "\")) Then
|
||||
IO.Directory.CreateDirectory(dirNameReplace_DEST & "\" & f.pud_filePathFolder.Replace("\\", "\"))
|
||||
If Not IO.Directory.Exists(dirNameReplace_DEST & "\" & f.pud_filePathFolder) Then '.Replace("\\", "\")
|
||||
IO.Directory.CreateDirectory(dirNameReplace_DEST & "\" & f.pud_filePathFolder) '.Replace("\\", "\")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -183,15 +184,17 @@ Public Class cProgrammeUpdate
|
||||
'Löschen der unbenötigten Files:
|
||||
For Each f In LIST_DEST
|
||||
If isOldFile(f, LIST_SOURCE) Then
|
||||
IO.File.Delete(dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\"))
|
||||
IO.File.Delete(dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName) '.Replace("\\", "\")
|
||||
End If
|
||||
Next
|
||||
|
||||
If dirNameReplace_DEST = "" Then dirNameReplace_DEST = destPfad
|
||||
'Kopieren/Überschreiben der neuen Files:
|
||||
For Each f In LIST_SOURCE
|
||||
If isNewFile(f, LIST_DEST) Then
|
||||
Dim s_path = dirNameReplace_SOURCE & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\")
|
||||
Dim d_path = dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\")
|
||||
Dim s_path = dirNameReplace_SOURCE & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName '.Replace("\\", "\")
|
||||
Dim d_path = dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName '.Replace("\\", "\")
|
||||
d_path = d_path '.replace("\\", "\")
|
||||
IO.File.Copy(s_path, d_path)
|
||||
End If
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user