I'm attempting to find all files that contain certain variations of a codec in their name, but when I try to execute the following code, I get nothing but '* Exited normally *'
- x264, X264, h264, H264
- as above, but with a period between the X/H and 264
#!/usr/bin/python3
import os
import re
rootdir = "/mnt/local/int002/Downloads/Complete"
regex = re.compile('x264')
for root, dirs, files in os.walk(rootdir):
for file in files:
if regex.match(file):
print(file)