Posted by: James McCall
The VisDosEnumPath( ) function does not return all directories in the path
variable. It is performing as advertised in the help file but I think it's
fair to call it a bug. The help file says ...
Windows does not support directories on the path with trailing backslashes;
if a path directory contains a trailing backslash, it is not returned.
While that might have been a valid statement in Windows 95 (and maybe even
98 and 2000) I am pretty sure Windows isn't fussy anymore. In fact there
are Microsoft and Gupta installed directories in my PATH environment
variable that have trailing slash.
OK, this is only tested on CTD2000 but there's a chance it hasn't been
changed in later versions of TD. Take a look at the sample app. attached.
I guess this hasn't bothered anyone because I haven't seen it mentioned in
the newsgroups before now. But if you do need VisDosEnumPath( ) with all
the directories this will do the job:
! Set nSearchPathCount = VisDosEnumPath( saSearchPath )
Set nSearchPathCount = SalStrTokenize( VisDosGetEnvString( 'PATH' ), '',
';', saSearchPath )