i'm trying to write a function which saves into an array what the file extention is of ever file within a folder
dim File_Extention(checklist quantity(),3)
for File = 1 to checklist quantity()
CS$ = checklist string$(File)
if mid$(CS$,len(CS$)-3) = "."
Extention = 3
else
if mid$(CS$,len(CS$)-2) = "."
Extention = 2
else
if mid$(CS$,len(CS$)-1) = "."
Extention = 1
else
Extention = 0
endif
endif
endif
File_Extention(File,Extention) = val(CS$)
next F
Extention = 0 being a folder
Extention = 1 being .*
Extention = 2 being .**
Extention = 3 being .***
but the above code doesn't work, it always comes up with 0 for everything
if anyone can help it would be much apriciated