mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-01-31 05:33:44 +00:00
Commit
This commit is contained in:
parent
3862e859d0
commit
6019f5a2d0
|
@ -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')
|
||||
|
|
@ -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.
|
|
@ -1 +0,0 @@
|
|||
# Dont forget to import OS
|
Loading…
Reference in New Issue
Block a user