Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from pathlib import Path
- inactive_folder =r"F:\DAZ 3D\Genesis 8\Female\Morphs_Recent"
- active_folder =r"F:\DAZ 3D\Genesis 8\Female\Morphs_Active"
- file1 = open('needed_morphs_list.txt', 'r')
- Lines = file1.readlines()
- count = 0
- for line in Lines:
- file = line.split('/')[6:]
- file_join = "/".join(file).strip('\n')
- q_join = Path(inactive_folder,file_join)
- dest_join = Path(active_folder,file_join)
- if q_join.exists():
- if dest_join.exists():
- print("MORPH DEST ALREADY EXISTS, ABORTING")
- else:
- Path(dest_join.parent.absolute()).mkdir(parents=True, exist_ok=True)
- #dest_join.mkdir(parents=True, exist_ok=True)
- Path(q_join).rename(dest_join)
- print("MOVE", q_join, "to", dest_join)
- else:
- print(q_join, "This morph isn't inactive")
Advertisement
Add Comment
Please, Sign In to add comment