''PathFile Collection 1.0.01 ''By Robin Wellner ''Functions to remove or get the dir of extention out a filename string ''You can use them together as in this example: ''PRINT "-" + RemExt$(RemDir$("C:\Rapid.Q\Project\Help.exe")) ''PRINT "-" + GetExt$(GetDir$("C:\Rapid.Q\Project\Help.exe")) ''Monitor output: ''-Help ''- ''I tested it very well, so you don't have to be more carefull then other times ''RemDir$ 1.1 ''By Robin Wellner ''Function to remove the dir out a filename string ''Example: ''PRINT RemDir$("Rapidq.exe") ''PRINT RemDir$("C:\A.ico") ''PRINT RemDir$("C:\Rapid.Q\Project") ''PRINT RemDir$("Hello world!") ''Monitor output: ''Rapidq.exe ''A.ico ''Project ''Hello world! FUNCTION RemDir$(PathFile AS STRING) AS STRING RemDir$ = RIGHT$(PathFile,LEN(PathFile) - RINSTR(PathFile,"\")) END FUNCTION ''RemExt$ 1.1 ''By Robin Wellner ''Function to remove the extention out a filename string ''Example: ''PRINT RemExt$("Rapidq.exe") ''PRINT RemExt$("C:\A.ico") ''PRINT RemExt$("C:\Rapid.Q\Project") ''PRINT RemExt$("Hello world!") ''Monitor output: ''Rapidq ''C:\A ''C:\Rapid.Q\Project ''Hello world! FUNCTION RemExt$(PathFile AS STRING) AS STRING DIM RE$ AS STRING IF RINSTR(PathFile,".") > RINSTR(PathFile,"\") THEN RE$ = LEFT$(PathFile,RINSTR(PathFile,".") - 1) ELSE RE$ = PathFile RemExt$ = RE$ END FUNCTION ''GetExt$ 1.2 ''By Robin Wellner ''Function to get the extention out a filename string ''Example: ''PRINT GetExt$("Rapidq.exe") ''PRINT GetExt$("C:\A.ico") ''PRINT GetExt$("C:\Rapid.Q\Project") ''PRINT GetExt$("Hello world!") ''Monitor output: ''exe ''ico '' '' FUNCTION GetExt$(PathFile AS STRING) AS STRING DIM GE$ AS STRING IF RINSTR(PathFile, ".") <> "" THEN GE$ = RIGHT$(PathFile, LEN(PathFile) - RINSTR(PathFile,".")) ELSE GE$ = "" GetExt$ = GE$ END FUNCTION ''GetDir$ 1.0 ''By Robin Wellner ''Function to remove the dir out a filename string ''Example: ''PRINT GetDir$("Rapidq.exe") ''PRINT GetDir$("C:\A.ico") ''PRINT GetDir$("C:\Rapid.Q\Project") ''PRINT GetDir$("Hello world!") ''Monitor output: '' ''C:\ ''C:\Rapid.Q\ '' FUNCTION GetDir$(PathFile AS STRING) AS STRING GetDir$ = LEFT$(PathFile, RINSTR(PathFile,"\")) END FUNCTION