14.08.2019

This commit is contained in:
2019-08-14 09:02:16 +02:00
parent 82e1bf915b
commit 554262d804
4 changed files with 87 additions and 20 deletions

View File

@@ -489,11 +489,13 @@ Public Class frmStartOptions
Public Function copyFile(file, toDirectory, Optional ByRef dest = "")
If Not IO.File.Exists(file) Then Return False
If Not IO.Directory.Exists(toDirectory) Then IO.Directory.CreateDirectory(toDirectory)
dest = toDirectory & cut_file(file)
dest = toDirectory & ".tmp_" & cut_file(file)
If IO.File.Exists(dest) Then
dest = toDirectory & Now.ToString("yyMMdd_HHmmss.fff_") & cut_file(file)
dest = toDirectory & ".tmp_" & Now.ToString("yyMMdd_HHmmss.fff_") & cut_file(file)
End If
IO.File.Copy(file, dest) ' Verschiebt die Datei
IO.File.Move(dest, dest.ToString.Replace(".tmp_", "")) ' Umbenennen der Datei --> der "." am Anfang dient dazu, dass die Datei nicht abgegriffen wird, während sie kopiert wird!
dest = dest.ToString.Replace(".tmp_", "")
Return True
End Function