Answers for "scan all directories with python"

0

scan all directories with python

import glob

# path to search single character filename
path = "sales/?.jpeg"
for file in glob.glob(path):
    print(file)

# path to search three-character filename
path = "sales/???.jpeg"
for file in glob.glob(path):
    print(file)

# search file that starts with word 'cha' followed by exact two-character
path = "sales/cha??.txt"
for file in glob.glob(path):
    print(file)
Posted by: Guest on August-08-2021
0

scan all directories with python

import glob

# path to search single character filename
path = "sales/?.jpeg"
for file in glob.glob(path):
    print(file)

# path to search three-character filename
path = "sales/???.jpeg"
for file in glob.glob(path):
    print(file)

# search file that starts with word 'cha' followed by exact two-character
path = "sales/cha??.txt"
for file in glob.glob(path):
    print(file)
Posted by: Guest on August-08-2021

Code answers related to "scan all directories with python"

Python Answers by Framework

Browse Popular Code Answers by Language