Copy, Rename or Delete Files
Private Sub FileDelete(filename As String)
IO.File.Delete(filename)
End Sub
'
Private Sub FileRename(oldName As String, newName As String)
IO.File.Move(oldName, newName)
' Rename file - if new name exists then throw exception
End Sub
'
Private Sub FileRenameOverwrite(oldName As String, newName As String)
IO.File.Move(oldName, newName, True) ' Rename file - if new name exists then overwrite it
' Rename file = if newName exists then overwrite newName file
End Sub
'
Private Sub FileCopy(existingName As String, newName As String)
IO.File.Copy(existingName, newName)
' Copy File - if new name exists then throw exception
End Sub
'
Private Sub FileCopyOverwrite(existingName As String, newName As String)
IO.File.Copy(existingName, newName, True) ' Copy file - if new name exists then overwrite it
' Copy file = if newName exists then overwrite newName file
End Sub
DigitalDan.co.uk