System.IO, Zugferd, Dakosy-Import Firma gesetzt durch Division1
This commit is contained in:
@@ -1055,7 +1055,7 @@ Public Class cAsfinag
|
||||
FTP_PFAD_TEST = cAsfinag.Paramter.GET_PARAM_ByName("SERVER_Path_Out_Test", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
|
||||
FTP_PFAD = cAsfinag.Paramter.GET_PARAM_ByName("SERVER_Path_Out", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
|
||||
|
||||
If Not IO.Directory.Exists(VERARBEITUNG_PFAD) Then IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
|
||||
If Not System.IO.Directory.Exists(VERARBEITUNG_PFAD) Then System.IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
|
||||
'If Not IO.Directory.Exists(FTP_PFAD_TEST) Then IO.Directory.CreateDirectory(FTP_PFAD_TEST)
|
||||
|
||||
End Function
|
||||
@@ -1397,19 +1397,19 @@ Public Class cAsfinag
|
||||
SERVER_Path = FTP_PFAD
|
||||
End If
|
||||
|
||||
For Each f In IO.Directory.GetFiles(BEREITSTELLUNG_PFAD)
|
||||
Dim fi As New IO.FileInfo(f)
|
||||
For Each f In System.IO.Directory.GetFiles(BEREITSTELLUNG_PFAD)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
|
||||
If Not fi.Name.StartsWith(".") AndAlso fi.Name.Contains(filename) Then
|
||||
Dim zielPfad = SERVER_Path
|
||||
'While IO.File.Exists(zielPfad)
|
||||
' zielPfad = SERVER_Path & "\" & Now.ToString("yyyyMMdd_HHmmss_") & fi.Name
|
||||
'End While
|
||||
IO.File.Copy(f, zielPfad & "\" & fi.Name, True)
|
||||
If IO.File.Exists(zielPfad & "\" & fi.Name) Then
|
||||
System.IO.File.Copy(f, zielPfad & "\" & fi.Name, True)
|
||||
If System.IO.File.Exists(zielPfad & "\" & fi.Name) Then
|
||||
|
||||
If Not IO.Directory.Exists(ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\") Then IO.Directory.CreateDirectory(ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\")
|
||||
IO.File.Move(BEREITSTELLUNG_PFAD & "\" & fi.Name, ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\" & fi.Name)
|
||||
If Not System.IO.Directory.Exists(ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\") Then System.IO.Directory.CreateDirectory(ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\")
|
||||
System.IO.File.Move(BEREITSTELLUNG_PFAD & "\" & fi.Name, ARCHIV_PFAD & "\" & Now.Year & "\" & filename & "\" & fi.Name)
|
||||
If filename = "TWL" Then whiteListExported = True
|
||||
If filename = "TBL" Then blacklisteExported = True
|
||||
End If
|
||||
@@ -1418,10 +1418,10 @@ Public Class cAsfinag
|
||||
|
||||
Next
|
||||
|
||||
For Each f In IO.Directory.GetFiles(SERVER_Path)
|
||||
Dim fi As New IO.FileInfo(f)
|
||||
For Each f In System.IO.Directory.GetFiles(SERVER_Path)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
If fi.Name.ToUpper.Contains("DO_NOT_DELETE") AndAlso whiteListExported AndAlso blacklisteExported Then
|
||||
IO.File.SetLastWriteTime(fi.FullName, Now())
|
||||
System.IO.File.SetLastWriteTime(fi.FullName, Now())
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -1458,7 +1458,7 @@ Public Class cAsfinag
|
||||
FTP_PFAD_TEST = cAsfinag.Paramter.GET_PARAM_ByName("SERVER_Path_In_Test", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
|
||||
FTP_PFAD = cAsfinag.Paramter.GET_PARAM_ByName("SERVER_Path_In", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
|
||||
|
||||
If Not IO.Directory.Exists(VERARBEITUNG_PFAD) Then IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
|
||||
If Not System.IO.Directory.Exists(VERARBEITUNG_PFAD) Then System.IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
|
||||
|
||||
End Function
|
||||
|
||||
@@ -1476,18 +1476,18 @@ Public Class cAsfinag
|
||||
End If
|
||||
|
||||
Dim catchedFiles As Boolean = False
|
||||
For Each f In IO.Directory.GetFiles(SERVERPath)
|
||||
Dim fi As New IO.FileInfo(f)
|
||||
For Each f In System.IO.Directory.GetFiles(SERVERPath)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
If fi.Name.ToUpper.Contains(fileType) Then
|
||||
If Not fi.Name.StartsWith(".") Then
|
||||
Dim zielPfad = VERARBEITUNG_PFAD & "\" & fi.Name
|
||||
While IO.File.Exists(zielPfad)
|
||||
While System.IO.File.Exists(zielPfad)
|
||||
zielPfad = VERARBEITUNG_PFAD & "\" & "DOPPELT" & "\" & fi.Name.Replace(fi.Extension, "") & fi.Extension & Now.ToString("_yyyyMMdd_HHmmss")
|
||||
End While
|
||||
IO.File.Copy(f, zielPfad)
|
||||
System.IO.File.Copy(f, zielPfad)
|
||||
|
||||
If IO.File.Exists(zielPfad) Then
|
||||
IO.File.Delete(f)
|
||||
If System.IO.File.Exists(zielPfad) Then
|
||||
System.IO.File.Delete(f)
|
||||
catchedFiles = True
|
||||
End If
|
||||
|
||||
@@ -1503,10 +1503,10 @@ Public Class cAsfinag
|
||||
Next
|
||||
|
||||
' zur prüfung ob Daten von uns abgeholt wurden bzw. ob Daten von Asfingag bereitgestellt wurden
|
||||
For Each f In IO.Directory.GetFiles(SERVERPath)
|
||||
Dim fi As New IO.FileInfo(f)
|
||||
For Each f In System.IO.Directory.GetFiles(SERVERPath)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
If fi.Name.ToUpper.Contains("DO_NOT_DELETE") AndAlso catchedFiles Then
|
||||
IO.File.SetLastWriteTime(fi.FullName, Now())
|
||||
System.IO.File.SetLastWriteTime(fi.FullName, Now())
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user