Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import os
  2.  
  3.  
  4. class AddFile:
  5. def __init__(self):
  6. print('value')
  7.  
  8. def Add_file(self, folder):
  9. for file in os.listdir(folder):
  10. print(file + ' DONE!')
  11. if file[-3:] == 'mp3':
  12. TrackPath = open('TrackPath.txt', 'w')
  13. TrackPath.write(folder + file)
  14. TrackPath.close()
  15. TrackList = open('TrackList.txt', 'w')
  16. TrackList.write(file[:3])
  17. TrackList.close()
  18.  
  19. AddFile.Add_file('C:/Users/Alcat/Downloads/test/')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement