F
fixertool
using visual studio 2005, framework 2.0, winXP SP2
I have a winform with two text-boxes, both associated with a folder
browser dialog (no problem with this), and a button.
First text-box has the origin folder, and the other points to the
destination one.
Aditionally, I have a "backup" folder.
The CONTENT of the origin folder is copied into destination's. But
first, I have to move all the destination content to a new subfolder
inside "backup".
When I'm talking of the Content of a folder, I'm meaning all the
archives and subfolders (with all its content) inside that folder.
The problem is when I try to move destination content to the newly
created subfolder (inside backup), Destination folder disappears.
This is the code (very simple as you may see)
Imports System.IO
Imports System.Diagnostics
// not using other references
Directory.CreateDirectory(BackupSubFolder)
//created inside BackupFolder (no problem with this)
If Directory.Exists(destinationFolder) Then
// destination content is moved here. But after this,
destinationFolder disappears...
Directory.Move(destinationFolder, BackupFolder)
Else
MessageBox.Show("BackupSubFolder Not Created")
End If
I have a winform with two text-boxes, both associated with a folder
browser dialog (no problem with this), and a button.
First text-box has the origin folder, and the other points to the
destination one.
Aditionally, I have a "backup" folder.
The CONTENT of the origin folder is copied into destination's. But
first, I have to move all the destination content to a new subfolder
inside "backup".
When I'm talking of the Content of a folder, I'm meaning all the
archives and subfolders (with all its content) inside that folder.
The problem is when I try to move destination content to the newly
created subfolder (inside backup), Destination folder disappears.
This is the code (very simple as you may see)
Imports System.IO
Imports System.Diagnostics
// not using other references
Directory.CreateDirectory(BackupSubFolder)
//created inside BackupFolder (no problem with this)
If Directory.Exists(destinationFolder) Then
// destination content is moved here. But after this,
destinationFolder disappears...
Directory.Move(destinationFolder, BackupFolder)
Else
MessageBox.Show("BackupSubFolder Not Created")
End If