public void AddSection(object input = null) { // 1. Add section to database new SectionRepo().AddSection(); // 2. Repopulate the Sections list and set the selected section to last (The last will be the section we just created) _mainViewModel.GetSections(); // 3. Check if 'Sections' folder exists string sections_path = Path.Combine(Environment.CurrentDirectory, "Sections"); string section_folder_path = Path.Combine(sections_path, _mainViewModel.SelectedSection); if (!Directory.Exists(sections_path)) { Directory.CreateDirectory(sections_path); } // 4. Create folders for the new section Directory.CreateDirectory(section_folder_path); Directory.CreateDirectory(Path.Combine(section_folder_path, "Files")); Directory.CreateDirectory(Path.Combine(section_folder_path, "Logs")); // 5. Copy blank database files into new section directory File.Copy(Path.Combine(Environment.CurrentDirectory, "NikasDB.sqlite3"), Path.Combine(section_folder_path, "NikasDB.sqlite3")); File.Copy(Path.Combine(Environment.CurrentDirectory, "User.sqlite3"), Path.Combine(section_folder_path, "User.sqlite3")); }