 Hi again, in this lesson we're going to talk about that how to rename files in Python programming language. What we want to do in our example is to go to the folder images on the drive and to rename all these images. As you can see every image file starts with word image and with underscore. So we want to rename our images that they don't contain anymore word image and underscore. So first what we need to do is to import OS module which will provide to us methods to work further in our example. Now we want to change our current working directory by calling method change directory. So we want to go to directory images on the drive. Now our working directory is this and now we want to find or we want to list all our directories. So we'll use method list directory and inside we'll provide as an argument dot which means list all files in our directory. And we want to loop those files one by one and put them in the variable file name. So we'll save for file name in all these files inside our directory. We want to ask if our file name starts with what. As you can see in our folder all images starts with word image and with underscore. So we want to ask if our files starting with image following by underscore and if they do we want to rename our files. But you must also notice that image i has index 1, m has index 2, m has index 1, a has index 2, g has index 3, e has index 4 and underscore has index 5. So if we want to delete those first characters we must start in our new renamed string at index 6. So we do not want to see those characters in our string and we want to start from the first character after underscore and it has index 6. So we'll say OS, let's call method rename to rename our file names which starts with these characters. Let's rename our file name with new file name that do not have this image word and this underscore. And that's it. Let me check the situation. After we press enter and run our code we will not have longer these image words in our image files. Okay, let's check it and as you can see we've successfully renamed our image files. That's all in this video. Thanks for watching. Happy coding.