Commit 82b1d858 authored by VihangiSalgado's avatar VihangiSalgado

File Management

parent fc88d1bc
...@@ -49,12 +49,14 @@ namespace WindowsFormsApp1 ...@@ -49,12 +49,14 @@ namespace WindowsFormsApp1
private void Button2_Click(object sender, EventArgs e) private void Button2_Click(object sender, EventArgs e)
{ {
String location = textBox2.Text; String location = textBox2.Text;
String FolederName = textBox1.Text; String FolederName = textBox1.Text;
String path = location; String path = location;
String file = System.IO.Path.Combine(path, FolederName); String file = System.IO.Path.Combine(path, FolederName);
DirectoryInfo directoryInfo = Directory.CreateDirectory(file); DirectoryInfo directoryInfo = Directory.CreateDirectory(file);
string subFile = FolederName;
if (checkBox1.Checked) if (checkBox1.Checked)
{ {
...@@ -71,6 +73,25 @@ namespace WindowsFormsApp1 ...@@ -71,6 +73,25 @@ namespace WindowsFormsApp1
directoryInfo.CreateSubdirectory("Scenes"); directoryInfo.CreateSubdirectory("Scenes");
} }
string rootpath = @"C:\Assist Backup";
string folder = System.IO.Path.Combine(rootpath, FolederName);
DirectoryInfo rootInfo = Directory.CreateDirectory(folder);
if (checkBox1.Checked)
{
rootInfo.CreateSubdirectory("Assets");
}
if (checkBox2.Checked)
{
rootInfo.CreateSubdirectory("Shots");
}
if (checkBox3.Checked)
{
rootInfo.CreateSubdirectory("Scenes");
}
MessageBox.Show("Successfully Created"); MessageBox.Show("Successfully Created");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment