works well. some additional functions for this library:
ff_juststem - returns the just the filename without the extension
ff_justext - returns just the file extension
ff_addbs - adds a backslash to a path if needed
ff_forceext - forces the file extension To be the extension passed
ff_forcepath - forces the path of a file to a different path
ff_juststem - returns the just the filename without the extension
ff_justext - returns just the file extension
ff_addbs - adds a backslash to a path if needed
ff_forceext - forces the file extension To be the extension passed
ff_forcepath - forces the path of a file to a different path
; ================================ ; Author: gman ; Date: 2004_08_18 ; Title: ff_juststem ; Description: - returns the just the filename without the extension ; Requirements: - File-Function collection by Klaas (ID: 934) ; ================================ Function ff_juststem$(file$) file$=ff_filename(file$) xff_split(".",file$) Return xff_splitresult(0) End Function ; ================================ ; Author: gman ; Date: 2004_08_18 ; Title: ff_justext ; Description: - returns just the file extension ; Requirements: - File-Function collection by Klaas (ID: 934) ; ================================ Function ff_justext$(file$) file$=ff_filename(file$) xff_split(".",file$) Return xff_splitresult(1) End Function ; ================================ ; Author: gman ; Date: 2004_08_18 ; Title: ff_addbs ; Description: - adds a backslash to a path if needed ; Requirements: - File-Function collection by Klaas (ID: 934) ; ================================ Function ff_addbs$(path$) path$=Trim(path$) If Right(path$,1)<>"" path$=path$+"" EndIf Return path$ End Function ; ================================ ; Author: gman ; Date: 2004_08_18 ; Title: ff_forceext ; Description: - forces the file extension To be the extension passed ; Requirements: ; - File-Function collection by Klaas (ID: 934) ; - ff_addbs(), ff_juststem() ; ================================ Function ff_forceext$(file$,ext$) path$=ff_addbs(ff_pathname(file$)) file$=ff_juststem(file$) If file$<>"" file$=file$+"."+ext$ EndIf Return path$+file$ End Function ; ================================ ; Author: gman ; Date: 2004_08_18 ; Title: ff_forcepath ; Description: - forces the path of a file to a different path ; Requirements: ; - File-Function collection by Klaas (ID: 934) ; - ff_addbs() ; ================================ Function ff_forcepath$(file$,path$) path$=ff_addbs(path$) file$=ff_filename(file$) Return path$+file$ End Function