List "Folder Names" to listbox

In this category you can exchange your programming questions and solutions.
Post Reply
Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

List "Folder Names" to listbox

Post: # 1015Post Darren
Wed Dec 19, 2012 2:43 pm

Can anybody tell me if it is possible, using FNXBasic, to list all the "Folder Names" inside a given "Folder".

For example,

Say I had a folder called "C:Test"

I want to list all the folders that are inside this folder

eg [For example only!!!!]

C:TestFred

C:TestHarry

etc etc

Many thanks in advance!!!!

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

List "Folder Names" to listbox

Post: # 1016Post Marco
Wed Dec 19, 2012 4:11 pm

hi, maybe you have to study this console example, i think it does what you`re looking for.
best regards

`folders of folders
dim foldername as string
dim returnstr as string
dim a as string
foldername="c:windows*.*"

returnstr=findfirst$(foldername)
if fileinfo$(4)="16" then print returnstr
while returnstr<>""
  returnstr=findnext$
if fileinfo$(4)="16" then print returnstr
wend
print "Strike a key to end"
while inkey$="":wend

Post Reply