Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Windows python help.


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

digitalchameleon wrote: Anybody out there that could test this python code on a windows machine? It's designed to work on linux and windows. Works fine on linux, but I don't have a working windows box to run it on right now.

http://www.hellboundhackers.org/code/file-searcher-1305_python.html

So far works great (Win XP), It'd probably deserver better output, but besides that nice script:)


ghost's Avatar
0 0

Thanks. How is the speed, when compared to using the windows search?


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

digitalchameleon wrote: Thanks. How is the speed, when compared to using the windows search?

For small and specific searches(like searching couple of folders it is slightly slower, but when you want to search globally this error is encountered:

Traceback (most recent call last):
  File "test.py", line 51, in <module>
    FileCrawler.start(rootpath)
  File "test.py", line 30, in start
    self.__scanpath(self.futurepaths.pop())
  File "test.py", line 12, in __scanpath
    items=listdir(path)
WindowsError: [Error 5] Access is denied: 'C:\\System Volume Information/*.*'

This occurs if only drive directory is used as root dir, I think you would have to add special exceptions for windows searches for specific system files etc. to avoid this error


ghost's Avatar
0 0

Should be fixed now. Simple try/except was required. Thanks for all the help. :)


fuser's Avatar
Member
0 1

Just wondering, did you make this in Python 2.6 or Python 3? I wanted to make sure before I try running it.


ghost's Avatar
0 0

Well I ran it using Python 2.6 on Windows Vista and it works great .