SHARE
TWEET

Untitled

a guest Sep 18th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import shutil
  3.  
  4. fileNames = ["one", "two", "three"]
  5.  
  6. i = 1
  7.  
  8. for fileName in fileNames:
  9.     srcName = "./" + fileName
  10.     destName = "./dest/" + str(i) + "." + fileName
  11.     i = i + 1
  12.     shutil.copy(srcName, destName)
  13.     print("successfully, renamed file names. and copied in to : " + destName)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top