Task

Write a program that will list everything in the current folder,   similar to:

   the Unix utility   “ls”   [1]       or 
   the Windows terminal command   “DIR” 


The output must be sorted, but printing extended details and producing multi-column output is not required.



Example output
For the list of paths:

/foo/bar
/foo/bar/1
/foo/bar/2
/foo/bar/a
/foo/bar/b



When the program is executed in   `/foo`,   it should print:

bar

and when the program is executed in   `/foo/bar`,   it should print:

1
2
a
b



files #f, DefaultDir$ + "\*.*" 	' RunBasic Default directory.. Can be any directroy
print "rowcount: ";#f ROWCOUNT()		' how many rows in directory
#f DATEFORMAT("mm/dd/yy") 			'set format of file date or not
#f TIMEFORMAT("hh:mm:ss") 			'set format of file time or not
count = #f rowcount()
for i = 1 to count				' loop thru the row count
print "info: ";#f nextfile$()			' file info         
print "name: ";#f NAME$()			' Name of file
print "size: ";#f SIZE()			' size
print "date: ";#f DATE$()			' date
print "time: ";#f TIME$()			' time
print "isdir: ";#f ISDIR()			' 1 = is a directory
next