Created
December 12, 2021 04:01
-
-
Save Neko288/af12c80e7051bf01a7a8ee932526ed86 to your computer and use it in GitHub Desktop.
フォルダーの中の音楽を全てプレイリストにします。
This file contains 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
# coding: UTF-8 | |
import os | |
playlist_path = 'C:/XXX.m3u'#プレイリストを配置するパス。最後の「/test.m3u」が大事っす。 | |
path = 'D:/XX/XXX'+'/'#プレイリストにしたい音楽があるフォルダーのパス。 | |
def tukuru(songs_path): | |
with open(playlist_path, 'w',encoding='utf-8') as f: | |
f.write(songs_path) | |
songs = os.listdir(path) | |
songs_path = '' | |
for song_path in songs: | |
songs_path += path+song_path+'/n' | |
tukuru(songs_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment