title: Rename directory using save filedialog filename
body: <p>I Have a folder in this path
  C:\Users\XXX\Desktop\Original\XXX\bin\Debug\Backup</p>
  
  <p>And when I save my project with "XXX" name the same time I need to change the Backup Folder using that save filedialog name and it shouldn't overwrite it.</p>
  
  <p>Can anyone suggest me how to do this:</p>
  
  <p>Here is the code how I am doing it and it didn't work for me:</p>
  
  <p>Private Sub SaveProject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveProject.Click</p>
  
  <pre><code>    Using sfdlg As New Windows.Forms.SaveFileDialog
          sfdlg.OverwritePrompt = True
          sfdlg.InitialDirectory = "C:\"
          sfdlg.FileName = "Untitled"
          sfdlg.DefaultExt = "amk"
          sfdlg.Filter = "AquaMark Project|*.amk"
          If sfdlg.ShowDialog = Windows.Forms.DialogResult.OK Then
  
  
              Dim SaveData As New gCanvasData
  
              With SaveData
                  frmDisplay.GCanvas1.UnselectCurrentAnotate()
                  .gAnnotates = frmDisplay.GCanvas1.gAnnotates
                  .Image = frmDisplay.GCanvas1.Image
  
              End With
  
              Using objStreamWriter As New StreamWriter(sfdlg.FileName)
                  Dim x As New XmlSerializer(GetType(gCanvasData))
                  x.Serialize(objStreamWriter, SaveData)
                  objStreamWriter.Close()
              End Using
          End If
          sfdlg.Dispose()
          System.IO.Path.GetFileNameWithoutExtension(sfdlg.FileName)
          IO.Directory.Move(Application.StartupPath + "\Backup\", Application.StartupPath + "\Backup\" &amp; System.IO.Path.GetFileNameWithoutExtension(sfdlg.FileName))
      End Using
  End Sub
  </code></pre>
  
  <p>But can anyone clearly mention me how to do it?</p>