Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void createDirs(string str)
- {
- string[] dirs = str.Split('\\');
- string new_str = String.Empty;
- foreach (string dir in dirs)
- {
- new_str += dir + "\\";
- if (Directory.Exists(new_str) == false)
- {
- try
- {
- Directory.CreateDirectory(new_str);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString(), "Error creating directories");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement