Created
September 22, 2017 03:14
-
-
Save Sg4Dylan/cba3d9cc640d89d6ed82f9f620805a33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from_e = 'utf-8' | |
to_e = 'gbk' | |
command = "iconv -f %s -t %s " % (from_e, to_e) | |
for i in os.listdir(): | |
if i.endswith('.m3u'): | |
file_s = "\"%s\" > \"%s\"" % (i,to_e+i) | |
os.system(command+file_s) | |
os.remove(i) | |
os.rename(to_e+i,i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment