프로젝트

일반

사용자정보

통계
| 개정판:

hytos / minorTools / fileChecker.py @ d8b09f9f

이력 | 보기 | 이력해설 | 다운로드 (942 Bytes)

1
import os
2

    
3
pngPath = "W:\ID2_Project\POSCO\drawings"
4
pdfPath = os.path.join("W:\ID2_Project\POSCO\drawings", "Native")
5
pngList = os.listdir(pngPath)
6
pdfList = os.listdir(pdfPath)
7

    
8
for index in range(len(pngList)):
9
    pngList[index] = pngList[index].replace('_Page1.png', '')
10
for index in range(len(pdfList)):
11
    pdfList[index] = pdfList[index].replace('.pdf', '')
12

    
13
for index in range(len(pngList) - 1, -1, -1):
14
    if pngList[index] in pdfList:
15
        pngList.pop(index)
16

    
17
for png in pngList:
18
    print(png)
19

    
20
print('=======')
21

    
22
pngList = os.listdir(pngPath)
23
pdfList = os.listdir(pdfPath)
24
for index in range(len(pngList)):
25
    pngList[index] = pngList[index].replace('_Page1.png', '')
26
for index in range(len(pdfList)):
27
    pdfList[index] = pdfList[index].replace('.pdf', '')
28

    
29
for index in range(len(pdfList) - 1, -1, -1):
30
    if pdfList[index] in pngList:
31
        pdfList.pop(index)
32

    
33
for png in pdfList:
34
    print(png)
35
    
36
        
37
        
클립보드 이미지 추가 (최대 크기: 500 MB)