Click here to Skip to main content
15,886,085 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
i am creating a console application,in which i want to perform the following functions on file/directories:
1) Create a directory
2) Create a file
3) Delete a file
4) Open a file
The application should display the menu with the options required and accepts user’s choice. Depending on the user’s choice perform the required functionality.
please Use DirectoryInfo and FileInfo classes.
Posted
Comments
R. Giskard Reventlov 16-Dec-11 3:36am    
We don't do homework.
Smithers-Jones 16-Dec-11 4:08am    
What's stopping you? Are you asking for permission?

If you are going to post your homework, at least try to make it look like you have attempted to do something yourself!

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, or learn the Magic Words: "Do you want fries with that?"
 
Share this answer
 
so whats problem! do start coding
1) Create a directory
Directory.CreateDirectory Method (String)[^] which is used to Creates all directories and sub-directories in the specified path.

2) Create a file
File.Create Method[^] which is used to Creates a file in the specified path.

3) Delete a file
File.Delete Method[^] which is used to Deletes the specified file.

4) Open a file
File.Open Method (String, FileMode)[^]
Process.Start Method[^]

have a try and revert back with specific question :)
 
Share this answer
 
v2
 
Share this answer
 

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