Files
Doku/Dokumentation/Classes/Folder.vb
2018-11-22 16:52:25 +01:00

24 lines
776 B
VB.net

Public Class Folder
Public Shared Function FolderMove(oldID As String, oldHost As String, newID As String, NewHost As String)
Dim PathOld As String
Dim PathNew As String
PathOld = Class1.FilePath & "\" & oldID & "\" & oldHost
PathNew = Class1.FilePath & "\" & newID & "\" & NewHost
If IO.Directory.Exists(PathNew) Then
MsgBox("Zielordner existiert bereits! Abbruch.")
Return "Fehler"
End If
If IO.Directory.Exists(Class1.FilePath & "\" & newID) Then
Else
IO.Directory.CreateDirectory(Class1.FilePath & "\" & newID)
End if
If IO.Directory.Exists(PathOld) Then
IO.Directory.Move(PathOld, PathNew)
End If
End Function
End Class