Creating a Subdirectory
So since I might change these out a couple of times while I’m testing, I’m going to instead of defining the path to
practice_files/ here, I’m going to put a constant here. I’m just going to say, I’m going to call this
"practice_dir". That’s what I eventually want to use. But now I’m going to comment that out because for now I’m going to work with
"copy_dir". So this is the directory that I’m going to use for now, and it’s going to be easy for me to change between these two by just commenting, uncommenting, or I could replace the string in here that points to the actual directory that I want to use. For now, it’s going to be
copy_dir/ here at the end, which means that whenever I’m going to run this script, it’s going to, yeah, use this
copy_dir/, which is my testing directory, so to say. Cool.
And now I want to test what I wrote so far and figure out whether running this code, the script as I have it so far, whether this is going to create a subdirectory called
images/ inside of
copy_dir/. Now, in order to be able to run this, I need to first save the file.
Okay, so I got it saved, and now I should be able to run this code and see the
images/ directory pop up. To run it, you can go to the menu, click on Run, and then Run Module, or you can press the shortcut F5.
Become a Member to join the conversation.