This is a python script to search for files and directories in root.Its kinda slow i was hoping for corrections
import os
count=0
print"File Searcher"
print"---------------------------------------------------------------"
print"---------------------------------------------------------------"
filename=raw_input("Enter file name to be searched:")
print"Searching for %s..."% filename
for rootDir,dirs,files in os.walk("/"):
for Dir in dirs:
if Dir.endswith(filename):
print count,".)PATH:",rootDir+"//"+Dir
count=count+1
for fileX in files:
if fileX.endswith(filename):
print count,".)PATH:",rootDir+"//"+fileX
count=count+1
count=count-1
print"End of search."
if count<=0:
print"No results matching \"%s\" found"% filename
else:
print"No of results found matching \"%s\"is %d"% (filename,count)