private void btNewFolder_Click(object sender, EventArgs e) { NewNameForm dlg = new NewNameForm("New Folder"); if (dlg.ShowDialog() == DialogResult.OK) { try { if (_serverListSelected) { _ftp.CreateDirectory(dlg.NewName); UpdateServerList(tbxServerFolder.Text.TrimEnd('/', '\\') + "/" + dlg.NewName); } else { Directory.CreateDirectory(Path.Combine(tbxLocalFolder.Text, dlg.NewName)); UpdateLocalList(tbxLocalFolder.Text); } } catch (Exception ex) { Log(ex); } } }