| import os |
|
|
| ignore_dirs = {'.vs', 'Binaries', 'Build', 'Saved', 'Intermediate', 'DerivedDataCache'} |
| ignore_exts = {'.sln', '.dll', '.exe', '.pdb', '.lib', '.obj'} |
|
|
| total_files = 0 |
| total_size = 0 |
|
|
| for root, dirs, files in os.walk(r'E:\UEProject\TideEater'): |
| dirs[:] = [d for d in dirs if d not in ignore_dirs] |
| for f in files: |
| if os.path.splitext(f)[1].lower() in ignore_exts: |
| continue |
| fp = os.path.join(root, f) |
| try: |
| sz = os.path.getsize(fp) |
| total_files += 1 |
| total_size += sz |
| except: |
| pass |
|
|
| print(f"待上传文件数:{total_files}") |
| print(f"待上传总大小:{total_size/1024/1024:.1f} MB ({total_size/1024/1024/1024:.2f} GB)") |
| print(f"预计提交次数(每批500文件):{(total_files + 499) // 500}") |
|
|