Advertisement
MyNamesNotReallyDave

u/aggiefury101 - rename

Feb 10th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. downloadPath = r'C:\Users\rgraham_adm\Desktop\RedditScript\Forms\'
  2. files = os.listdir(downloadPath)
  3.  
  4. for index, item in enumerate(files):
  5.    os.rename(f'{downloadPath}{item}', f'{downloadPath}{str(index)}.pdf')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement