User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » better directory search Page [1]  
MiniMe_877
All American
4414 Posts
user info
edit post

I'm trying to do a directory search on a networked drive through windows, but I only need to search one or two levels deep in a part of the directory tree, which spans many thousands of directories wide up to maybe 10 directories deep

Is there any existing utility that will do this?

or is it Python to the rescue!

6/19/2007 3:50:10 PM

MiniMe_877
All American
4414 Posts
user info
edit post

quick and dirty solution:

import os
for dir1 in os.listdir(os.getcwd()):
for dir2 in os.listdir(dir1):
print dir1 + '\\' + dir2


save that as pydir.py, then run it and grep through the output

6/19/2007 4:10:57 PM

 Message Boards » Tech Talk » better directory search Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.