Skip to content

Instantly share code, notes, and snippets.

@rounakdatta
Created May 30, 2018 04:43
Show Gist options
  • Save rounakdatta/5a5af5445b8b1d633093be52daaf1c27 to your computer and use it in GitHub Desktop.
Save rounakdatta/5a5af5445b8b1d633093be52daaf1c27 to your computer and use it in GitHub Desktop.
Rename multiple files in order in a second
import os
counter = 1
for file in os.listdir("."):
if file.endswith(".pdf"):
os.rename(file, "resume" + str(counter) + ".pdf")
counter += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment