I have a dataset with about 800 images and most are png with a few jpg files. The dataset is mounted in the drive of Google Colab. My question is I have this code below that helps with conversion, but it does not save the files in the images folder from the directory. How do I get the files to save in the original location in the loop?

```
directory = r'/content/drive/MyDrive/images/images/' 
for filename in os.listdir(directory): 
    if filename.endswith('.jpg'): 
        prefix = filename.split('.jpg')[0]
        # im = Image.open(filename)
        os.rename(filename, prefix+'.png')  
    else: 
        continue

```