From the course: C# File System Tips and Tricks
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Creatiing multiple folders - C# Tutorial
From the course: C# File System Tips and Tricks
Creatiing multiple folders
- [Instructor] So now, that we're able to create a single directory, let's take a look at how we can create multiple ones. A lot of the times, your program may need to create several different directories or nest directories inside of other ones. To get started, above our CreateDirectory method, let's create a new public string and we're going to call this folders. Let's go ahead and pre-populate this string with some values. Now, whenever we're working with paths as strings, it helps first to use the at sign before we type out the string. The at sign will convert the characters to Unicode, in this way, we don't have to escape any of the characters inside of the path. Here, we'll start our string by typing out Workspace. At the end, we'll use a backward slash. Since Windows primarily uses backward slashes for its file system, it makes sense for us to make sure that we include this at the end of our path. We wouldn't want to start the path with a backward slash because that would mean…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.