Skip to content

Instantly share code, notes, and snippets.

View rickkk856's full-sized avatar
🏠
Working from home

Ricardo Rodrigues rickkk856

🏠
Working from home
View GitHub Profile
@rickkk856
rickkk856 / rename_images.py
Created September 2, 2021 17:42 — forked from loisaidasam/rename_images.py
Rename images for use by ImageMagick convert or ffmpeg convert
# Goes a little something like this:
import os
files = [ f for f in os.listdir('.') if os.path.isfile(os.path.join('.',f)) and f.endswith('.jpg') ]
for i, file in enumerate(sorted(files)):
os.rename(file, 'image%03d.jpg' % i)
# Now with them renamed you can do something like:
@rickkk856
rickkk856 / move_random.py
Created July 2, 2021 20:22 — forked from spdin/move_random.py
Pick and move file to another folder randomly
import os, random, shutil
#Prompting user to enter number of files to select randomly along with directory
source=input("Enter the Source Directory : ")
dest=input("Enter the Destination Directory : ")
no_of_files=int(input("Enter The Number of Files To Select : "))
print("%"*25+"{ Details Of Transfer }"+"%"*25)
print("\n\nList of Files Moved to %s :-"%(dest))