Is there a way to make vb.net to overwrite the file when moving? Here is
what I'm trying to do:
If System.IO.File. Exists(dest) Then
'handle overwrite here
If MessageBox.Show ("Do you want to overwrite", "Overwrite File?",
MessageBoxButto ns.YesNo, MessageBoxIcon. Question) = DialogResult.Ye s Then
System.IO.File. Move(lstfilenam e, dest) 'I want to force overwrite file here
Else
what I'm trying to do:
If System.IO.File. Exists(dest) Then
'handle overwrite here
If MessageBox.Show ("Do you want to overwrite", "Overwrite File?",
MessageBoxButto ns.YesNo, MessageBoxIcon. Question) = DialogResult.Ye s Then
System.IO.File. Move(lstfilenam e, dest) 'I want to force overwrite file here
Else
Comment