Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import os
  2.  
  3. with open("data.txt") as infile:
  4. for line in infile:
  5. line = line.strip()
  6. if os.path.isfile(os.path.join("sounds", line)):
  7. os.rename(os.path.join("sounds", line), os.path.join("sounds", os.path.splitext(line)[0] + '.wav'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement