Dashboard Temp Share Shortlinks Frames API

HTMLify

hxf2ub8d74.py
Views: 9 | Author: guest
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import os
import time

download_dir = os.path.expanduser("~/Downloads/")

while True:
    filenames = os.listdir(download_dir)
    for filename in filenames:
        if filename.startswith("jpeg") and "." not in filename:
            n = 1
            while True:
                new_name = f"{n}.jpeg"
                if new_name not in os.listdir(download_dir):
                    break
                n += 1
            os.rename(download_dir + filename, download_dir + new_name)
    time.sleep(500)