Hi,
I was wondering if there is a way to do a recursive directory/file listing in PB
As I have tried to do it in Visual Basic but got stuck when I tried to search a protected folder
in Windows 7, Is there a way around the in PB ?
Thanks
Is there restrictions on recursive directory listing
-
- Enthusiast
- Posts: 202
- Joined: Sat Feb 18, 2012 10:21 pm
- Location: Leicestershire
-
- Enthusiast
- Posts: 202
- Joined: Sat Feb 18, 2012 10:21 pm
- Location: Leicestershire
Re: Is there restrictions on recursive directory listing
Your welcome.Pot Noodle wrote:Thanks Demivec didn't notice that one
Your thread topic here doesn't seem to match your intentions. You wanted a recursive directory listing, not an answer to restrictions on a listing.

-
- Enthusiast
- Posts: 202
- Joined: Sat Feb 18, 2012 10:21 pm
- Location: Leicestershire
Re: Is there restrictions on recursive directory listing
No not really, You see when I was running XP I wrote a program to keep your hard drive clean and free from junk etc..
But now in windows 7 the same program just wont run due to the directory structure now used.
When I ran the program I got unauthorizedAccessException error, I tried to catch the error and carry on
but the program would always holt at this point, Reading about it on the Microsoft web site didn't help
as it was all gobbledigook to me.
But now in windows 7 the same program just wont run due to the directory structure now used.
When I ran the program I got unauthorizedAccessException error, I tried to catch the error and carry on
but the program would always holt at this point, Reading about it on the Microsoft web site didn't help
as it was all gobbledigook to me.

P.N.
Re: Is there restrictions on recursive directory listing
(Recursive) recursive directory listing.
Procedure dir(path$,h)
ExamineDirectory(h,path$,"*.*")
While NextDirectoryEntry(h)
If DirectoryEntryType(h)=#PB_DirectoryEntry_File
Debug path$+DirectoryEntryName(h)
ElseIf DirectoryEntryName(h)<>"." And DirectoryEntryName(h)<>".."
dir(path$+"\"+DirectoryEntryName(h),h+1)
EndIf
Wend
FinishDirectory(h)
EndProcedure
dir("c:\windows",0) ; for example
Procedure dir(path$,h)
ExamineDirectory(h,path$,"*.*")
While NextDirectoryEntry(h)
If DirectoryEntryType(h)=#PB_DirectoryEntry_File
Debug path$+DirectoryEntryName(h)
ElseIf DirectoryEntryName(h)<>"." And DirectoryEntryName(h)<>".."
dir(path$+"\"+DirectoryEntryName(h),h+1)
EndIf
Wend
FinishDirectory(h)
EndProcedure
dir("c:\windows",0) ; for example