This commit is contained in:
Kunal Patil 2022-10-09 11:31:09 +05:30
parent 3862e859d0
commit 6019f5a2d0
3 changed files with 0 additions and 16 deletions

View File

@ -1,11 +0,0 @@
import os
folder_location = 'C:\\Users\\user\\Downloads\\demo'
os.chdir(folder_location)
list_of_files = os.listdir()
images = [content for content in list_of_files if content.endswith(('.png','.jpg','.jpeg'))]
for index, image in enumerate(images):
os.rename(image,f'{index}.png')

View File

@ -1,4 +0,0 @@
# Cleaning Download Folder
One of the messiest things in this world is the download folder of a developer. When writing a blog, working on a project, something similar we just download images and save them with ugly and funny names like asdfg.jpg.
This python script will clean your download folder by renaming and deleting certain files based on some condition.

View File

@ -1 +0,0 @@
# Dont forget to import OS