Question:

C# opendialog problem? ?

by  |  earlier

0 LIKES UnLike

i want to get a file name using opendialog form and then copy that file to a new location. how should i write?

thanks.

 Tags:

   Report

1 ANSWERS


  1. Well, the filename of a opendialog is OpenFileDialog1.FileName; (in case you're using 'OpenFileDialog1'). Now you only need the Move method of the System.IO namespace. The code should look like this:

    File.Copy( OpenFileDialog1.FileName, "newPath" );

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.