BCX Console Demonstration Program s122.bas

 MACRO SplitPath = _splitpath     ' << This is contained in stdlib.h 
 
 DIM a$, b$, c$, d$, e$
 
 a$ = "C:\some\phony\dummy\directory\FakeFileName.txt"
 
 SplitPath(a$, b$, c$, d$, e$)
 
 ?  "Orig Full Path .. : ", a$
 ?  "Drive Letter .... : ", b$
 ?  "Path ............ : ", c$
 ?  "Filename ........ : ", d$
 ?  "Extension ....... : ", e$

Result:


 Orig Full Path .. : C:\some\phony\dummy\directory\FakeFileName.txt
 Drive Letter .... : C:
 Path ............ : \some\phony\dummy\directory\
 Filename ........ : FakeFileName
 Extension ....... : .txt