Advertisement
caffeine314

Untitled

Sep 6th, 2023
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. from os import mkdir, join, exists
  2. from shutil import copy2
  3. from datetime import now
  4.  
  5. library: str = r'C:\Users\p\AppData\Roaming\MediaMonkey5'
  6. backup: str = r'C:\Users\p\Desktop\home\Dropbox\Backups\MediaMonkey'
  7.  
  8. filepath: str = join(backup, 'Media Monkey 5 Library - ' + now().strftime("%Y-%m-%d"))
  9. if not exists(filepath):
  10.     mkdir(filepath)
  11.  
  12. fileList: list[str] = ['Plugins', 'Scripts', 'MediaMonkey.ini', 'MM5.DB']
  13.  
  14. for file in fileList:
  15.     fromFile: str = join(library, file)
  16.     toFile: str = join(filepath, file)
  17.     copy2(src=fromFile, dst=toFile)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement