Guest User

Enable Daz Morphs

a guest
Jun 23rd, 2022
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. import os
  2. from pathlib import Path
  3.  
  4. inactive_folder =r"F:\DAZ 3D\Genesis 8\Female\Morphs_Recent"
  5. active_folder =r"F:\DAZ 3D\Genesis 8\Female\Morphs_Active"
  6.  
  7. file1 = open('needed_morphs_list.txt', 'r')
  8. Lines = file1.readlines()
  9.  
  10. count = 0
  11. for line in Lines:
  12.     file = line.split('/')[6:]
  13.     file_join = "/".join(file).strip('\n')
  14.     q_join = Path(inactive_folder,file_join)
  15.     dest_join = Path(active_folder,file_join)
  16.     if q_join.exists():
  17.         if dest_join.exists():
  18.             print("MORPH DEST ALREADY EXISTS, ABORTING")
  19.         else:
  20.             Path(dest_join.parent.absolute()).mkdir(parents=True, exist_ok=True)
  21.             #dest_join.mkdir(parents=True, exist_ok=True)
  22.             Path(q_join).rename(dest_join)
  23.             print("MOVE", q_join, "to", dest_join)
  24.     else:
  25.         print(q_join, "This morph isn't inactive")
Advertisement
Add Comment
Please, Sign In to add comment