diff --git a/check_lost.py b/check_lost.py new file mode 100644 index 0000000..0372cd9 --- /dev/null +++ b/check_lost.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +#coding:utf-8 + +import os, sys + +def check_lost(path): + psd_ids = [] + max_id = 0 + for root, dirs, files in os.walk(path): + for name in files: + psd_id = name.split("_")[0] + psd_ids.append(psd_id) + max_id = max(max_id, int(psd_id)) + + for i in range(1, max_id + 1): + if str(i) not in psd_ids: + print("缺失: " + str(i)) + +if __name__ == '__main__': + check_lost(sys.argv[1]) \ No newline at end of file diff --git a/缺失psd检测.bat b/缺失psd检测.bat new file mode 100644 index 0000000..20f4efe --- /dev/null +++ b/缺失psd检测.bat @@ -0,0 +1,2 @@ +python check_lost.py ./art_assets +pause \ No newline at end of file