Scanning all files in a computer
-
I'm looking for the best way to scan (go through) all the files on the computer (for search purposes etc.). i tried some ways but there's certain problems i couldn't find a solution to, such as a "no access" exception when it gets to the "system volume information" dir. so...what's the best way to do it?
-
I'm looking for the best way to scan (go through) all the files on the computer (for search purposes etc.). i tried some ways but there's certain problems i couldn't find a solution to, such as a "no access" exception when it gets to the "system volume information" dir. so...what's the best way to do it?
You can't get access to the System Volumn Information folder anyway. It belongs to the system and only the SYSTEM has any rights to what's in there. Strangely enough, you're saying that you can't get into this folder when you try to build an index of all the data and files on the drive, but yet, that's exactly what's in that folder. The Indexing Service already does this for you and stores it's index information in that folder. You might want to get a little primer by reading Heath Stewerts article on it here[^]. There's a link in the article to the documentation on MSDN. I highly suggest following it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
You can't get access to the System Volumn Information folder anyway. It belongs to the system and only the SYSTEM has any rights to what's in there. Strangely enough, you're saying that you can't get into this folder when you try to build an index of all the data and files on the drive, but yet, that's exactly what's in that folder. The Indexing Service already does this for you and stores it's index information in that folder. You might want to get a little primer by reading Heath Stewerts article on it here[^]. There's a link in the article to the documentation on MSDN. I highly suggest following it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007uhh..that's ASP.NET and i didn't say i WANTED access to System volume information...it just lists that directory along with all the others and when it tries to access it, it raises an exception and terminates the whole operation =\
-
uhh..that's ASP.NET and i didn't say i WANTED access to System volume information...it just lists that directory along with all the others and when it tries to access it, it raises an exception and terminates the whole operation =\
So catch the exception and skip that directory !
Luc Pattyn [My Articles]
-
uhh..that's ASP.NET and i didn't say i WANTED access to System volume information...it just lists that directory along with all the others and when it tries to access it, it raises an exception and terminates the whole operation =\
sharpiesharpie wrote:
uhh..that's ASP.NET
uhh... the EXACT same techniques are used for every other file on the system, not just ASP.NET files. Next time, try reading the ENTIRE article and following the links in it.
sharpiesharpie wrote:
and i didn't say i WANTED access to System volume information
I didn't say you did either.
sharpiesharpie wrote:
it just lists that directory along with all the others and when it tries to access it, it raises an exception and terminates the whole operation =\
It terminates because your code isn't written properly to handle errors where your code can't go. I told you, the Indexing Service already does this. All you have to do is apply the techniques found in that article and the MSDN documentation and you have a solution that's alomst pre-written.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007