Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
dear programming talents
hi
i Need urgent help to create a folder with the name of the combo box and text box values in solution directory, and put the pictureBox image into the folder and if folders Already created , it does not re-create And then copy the image directly into the old folders

The main folder is ( \Images
comboBox1 for names of directory \images\"comboBox1.selectedItem"
comboBox2 for names of sub-directory \images\"comboBox1.selectedItem"\"comboBox2.selectedItem"
textbox1 for put the names of sub-sub-directory \images\"comboBox1.selectedItem"\"comboBox2.selectedItem"\"textBox1.text"

picturebox1 is an image for save
\images\"comboBox1.selectedItem"\"comboBox2.selectedItem"\"textBox1.text"\*.jpg

buttom1 is a get image from file (openfiledialog)
buttom2 is a save image to a created sub-sub-directory from combo's and text Box values
for exampel
combo1 = oxford university ( name of university )
combo2= software engineering ( name of chores )
textbox = Albert anistain ( name of Professor )
pictureBox1 = A4 images of Examination questions

Many thanks for your help
God bless all of you
Posted
Comments
Sergey Alexandrovich Kryukov 18-Dec-14 16:21pm    
Not clear; does not see to make a lot of sense. What have you tried so far? What's the problem?
—SA
Amir Mir Motahari 19-Dec-14 13:25pm    
making directory via comboBox and textBox value ، Provided that it does not re-create the duplicate address
Sergey Alexandrovich Kryukov 19-Dec-14 13:27pm    
Not clear. Can you clearly describe the problem? The real problem.
—SA
Amir Mir Motahari 19-Dec-14 15:22pm    
i basis dont know how to save or import photos in the folder With the path to the root application folder and if there is a need to create a new folder that does not already exist, it would implement
Sergey Alexandrovich Kryukov 19-Dec-14 17:39pm    
What is "root application folder"? What is the problem? You know how to create a directory, how file names work, don't you?
—SA

1 solution

You need a method such as:

C#
string dir ="path";
if(Directory.Exists(dir)==false) Directory.CreateDirectory(dir);
 
Share this answer
 
Comments
Amir Mir Motahari 19-Dec-14 13:24pm    
How can I use this method in the form!
However, the control that I mentioned،R U can help me ?!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900