Hello, I've seen a thread about this b4, but now coudlnt find it and the link I've got, isnt working..
The idea is get each directory and file from a drive..
So I can store them.
Anyone knows?
Getting folders and files from a drive and storing them..
dagcrack,
I guess you mean to parse a whole tree or sub-tree ...
Here is the recursive code I use :
It does not list Folders (Case 2 where you can change it).
I guess you mean to parse a whole tree or sub-tree ...
Here is the recursive code I use :
Code: Select all
Global DirectoryLevel.l
Dim Directory.s(100)
Procedure ParseDirectory()
If ExamineDirectory(DirectoryLevel, Directory(DirectoryLevel), "*.*")
Repeat
UseDirectory(DirectoryLevel)
Type = NextDirectoryEntry()
Select Type
Case 0
Case 1
FileName.s = Directory(DirectoryLevel) + DirectoryEntryName()
Debug FileName.s
Case 2
Name.s = DirectoryEntryName()
If Name <> "." And Name <> ".."
Name = Directory(DirectoryLevel) + Name + "\"
DirectoryLevel + 1
Directory(DirectoryLevel) = Name
ParseDirectory()
UseDirectory(DirectoryLevel)
EndIf
EndSelect
Delay(5)
Until Type = 0
EndIf
DirectoryLevel - 1
EndProcedure
;
;
;
DirectoryLevel = 0
Directory(DirectoryLevel) = "C:\InetPub\"
ParseDirectory()
End
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
Does not matter if your code is free or not.
You can use it ...
Just add a banner to the user each time the program will use it !
Or do not add anything but remember I was part of your code ...
You can use it ...
Just add a banner to the user each time the program will use it !
Or do not add anything but remember I was part of your code ...
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )


