Page 1 of 1
Is there restrictions on recursive directory listing
Posted: Sat Jan 04, 2014 4:46 pm
by Pot Noodle
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
Re: Is there restrictions on recursive directory listing
Posted: Sat Jan 04, 2014 4:50 pm
by Demivec
There's been several solutions posted in the forum.
Here's
one.
Re: Is there restrictions on recursive directory listing
Posted: Sat Jan 04, 2014 8:53 pm
by Pot Noodle
Thanks Demivec didn't notice that one

Re: Is there restrictions on recursive directory listing
Posted: Sun Jan 05, 2014 4:52 am
by Demivec
Pot Noodle wrote:Thanks Demivec didn't notice that one

Your welcome.
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.

Re: Is there restrictions on recursive directory listing
Posted: Sun Jan 05, 2014 1:55 pm
by Pot Noodle
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.

Re: Is there restrictions on recursive directory listing
Posted: Wed Jan 08, 2014 12:51 am
by Pud
(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