The Challenge: Moving All Image Files to a New Directory
Once you’ve downloaded this folder, go ahead and inspect it. Click around in there. It should look something like this. So you have the
practice_files/ folder, then a
documents/ subfolder, and then there’s a bunch of stuff in there. And among other things, there are image files. For example, here is
So once you’re done, the new folder should have four files in it, the ones that I just mentioned before and that are listed here on the file again. Of course, your challenge is to do all of this with Python’s
You can go to the
pathlib documentation or go back to the course. You also want to test repeatedly to see whether your code actually does what you expect it to do. So that could be using
pathlib, or you can use your graphical user interface to see whether what you expect to happen actually happens. So those are some tips to take along on the way.
01:54 And now again, I will suggest you to stop here and don’t continue with the course. Try to tackle this challenge yourself. See if you can make it to the end, if you can complete it successfully. If you do need help, try a little before you actually go and look up the lessons.
02:20 If you solved it differently, that is completely fine. There’s always many, many different ways that you can tackle a challenge, and comparing your own approach to someone else’s approach can be a helpful way to learn and train your coding skills. So get started.
Become a Member to join the conversation.