-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (24 loc) · 889 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
def absoluteFilePaths(directory, mask):
for dirpath,_,filenames in os.walk(directory):
for f in filenames:
# yield os.path.abspath(os.path.join(dirpath, f))
#print(os.path.abspath(os.path.join(dirpath, f)))
if mask in f:
print(f)
def truncate_filename(directory, mask):
for dirpath, _, filenames in os.walk(directory):
for f in filenames:
# yield os.path.abspath(os.path.join(dirpath, f))
# print(os.path.abspath(os.path.join(dirpath, f)))
if mask in f:
print(f)
os.rename(f, f[:30] + ".pdf")
dir = "C:/Program Files/opencv-3-4-9/build/install/x64/vc16/"
mask = "349.lib"
# dir = ""
boost_dir = r'C:\Program Files\boost-1-71\stage\lib'
boost_mask = ".pdf"
libs = []
absoluteFilePaths(dir, mask)
# truncate_filename(dir, boost_mask)