Advertisement
illlitr8

Untitled

Apr 25th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. import os, sys
  2. path = sys.argv[1]
  3. os.chdir(path)
  4. for f in os.listdir("."):
  5.  if f.lower().endswith(".mp3"):
  6.   n = ''.join(f.split('.')[:-1])+".txt"
  7.   np = path+"\\txts\\"
  8.   if not os.path.exists(np):
  9.    os.makedirs(np)
  10.   if not os.path.exists(np+n):
  11.    open(np+n,'w').close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement