OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = "Opening file"; openFileDialog.InitialDirectory = @"c:\Program Files"; openFileDialog.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; openFileDialog.FilterIndex = 2; openFileDialog.RestoreDirectory = true; if (openFileDialog.ShowDialog() == DialogResult.OK) { txtFileName.Text = openFileDialog.FileName; }
Mark this as answer, if it is..... With regards Nishithraj Narayanan
string oldfilepath = "C:\\a\\myfile.txt"; SaveFileDialog dlg = new SaveFileDialog(); if(dlg.ShowDialog() == DialogResult.OK) File.Copy(oldfilepath, dlg.FileName);
www.abhisheksur.com
Login to post response