20 lines
		
	
	
		
			467 B
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			467 B
		
	
	
	
		
			Python
		
	
	
| #!/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]) |