Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to search a file in windows 10 using python

import os

def find_files(filename, search_path):
   result = []

# Wlaking top-down from the root
   for root, dir, files in os.walk(search_path):
      if filename in files:
         result.append(os.path.join(root, filename))
   return result

print(find_files("smpl.htm","D:"))
Comment

PREVIOUS NEXT
Code Example
Python :: download images python google 
Python :: stock market api python 
Python :: print column in 2d numpy array 
Python :: boto3 paginate 
Python :: python 2 decimal places format 
Python :: numpy empty image 
Python :: left join outer apply 
Python :: pause python 
Python :: python get pid of process 
Python :: block window if another window is open tkinter 
Python :: mac why is python installed in usr and application 
Python :: how to write to a netcdf file using xarray 
Python :: or condition in pandas 
Python :: pandas replace substring in column names 
Python :: how to change os path in python 
Python :: python datetime day of year 
Python :: python simple input popup 
Python :: images in django 
Python :: python append to first index 
Python :: create a dataframe python 
Python :: true positive true negative manually 
Python :: infix to postfix python code 
Python :: how to add an item to a list in python 
Python :: python copy variable 
Python :: python Pyramid Patterns 
Python :: anagram program in python 
Python :: get all file in folder python 
Python :: create new dataframe with columns from another dataframe pandas 
Python :: xa python 
Python :: python check string not exist in array 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =