hytos / minorTools / fileNameChanger.py @ 16dfc99b
이력 | 보기 | 이력해설 | 다운로드 (378 Bytes)
1 |
import os |
---|---|
2 |
|
3 |
rootPath = "E:\\from_desktop2\\ARS\OTEKO\\설계 Inform(240523)\\01_PID"
|
4 |
folderPath = os.path.join(rootPath, "_REV.A_name")
|
5 |
fileList = os.listdir(folderPath) |
6 |
|
7 |
print('start')
|
8 |
|
9 |
for index in range(len(fileList)): |
10 |
old = os.path.join(folderPath, fileList[index]) |
11 |
new = os.path.join(folderPath, fileList[index].replace('_Rev.A.pdf', '.pdf')) |
12 |
os.rename(old, new) |