Download MEDIA/scripts/copy_files.py from pebxcvi/PSHomeCacheDepot: direct link, hf CLI and curl.
- Browser
- Download file 649 Bytes
-
https://huggingface.co/datasets/pebxcvi/PSHomeCacheDepot/resolve/main/MEDIA/scripts/copy_files.py
- Command line
-
hf download hf://datasets/pebxcvi/PSHomeCacheDepot/MEDIA/scripts/copy_files.py
-
curl -L -o copy_files.py https://huggingface.co/datasets/pebxcvi/PSHomeCacheDepot/resolve/main/MEDIA/scripts/copy_files.py
649 Bytes
| import os | |
| import shutil | |
| log_file = 'log.txt' | |
| output_base = 'OUTPUT' | |
| source_base = os.getcwd() | |
| with open(log_file, 'r', encoding='utf-8') as f: | |
| for line in f: | |
| src_rel_path = line.strip().replace('\\', os.sep) | |
| src_abs_path = os.path.join(source_base, src_rel_path) | |
| dst_abs_path = os.path.join(output_base, src_rel_path) | |
| if os.path.isfile(src_abs_path): | |
| os.makedirs(os.path.dirname(dst_abs_path), exist_ok=True) | |
| shutil.copy2(src_abs_path, dst_abs_path) | |
| print(f"[+] Copied: {src_rel_path}") | |
| else: | |
| print(f"[!] Missing: {src_rel_path}") | |
| input("") |