saveFileDialog

  • Thread starter Thread starter juli
  • Start date Start date
J

juli

Hello dear fellows!
Is there any chance that you know how can I upload a file with the
saveFileDialog control to a specific folder-> I want any file uploaded
to be save on specific folder with specific name.
Do you know how?
Thank you very much!
 
Juli,

You mean something as this?

\\\this in a most simple situation to move a file using the openfiledialog
and the savefiledialog
OpenFileDialog OFD = new OpenFileDialog();
SaveFileDialog SFD = new SaveFileDialog();
if (OFD.ShowDialog()==DialogResult.OK)
{
if (SFD.ShowDialog()==DialogResult.OK)
{
System.IO.FileInfo fil =
new System.IO.FileInfo(OFD.FileName);
fil.MoveTo(SFD.FileName);
}
}
///
I hope this helps?

Cor
 
Hello:)
I need to save a file in a specific folder (with specific name) and the
same goes for the file name.
Maybe I don't need this control and need another one,or is it possible
to do so with it?
10xs!!
 
Juli,

Is it a textfile, a file you want to copy, or whatever, because that you do
not show.

However as I tried to show you, with saveFileDialog you only create the
filename (including the path)

Cor
 
Yes,it's a text file and I want to save it in a name abc.txt in a
c:/docs path.How do I do it in C#?
Thanks again!
 
Back
Top