import os

dir_url = '/Users/bagjeongtae/Desktop/test/'
files = os.listdir(dir_url)
for f in files:
    print(f)
    os.rename(dir_url+f, dir_url+f.replace('png', 'jpg'))

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=pjt3591oo&logNo=221218697187

+ Recent posts