[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Directory separators



Ben Tupper <btupper@bigelow.org> wrote:
> Howdy,
>  
> I have been using the following function to select the appropriate OS
> specific directory separator.  I have two questions about it: (1) what
> is the correct directory separator in VMS?, and (2) is there a built-in
> means of getting the same information?
>  
> Thanks,
>  
> Ben
>  
> ;------START
> FUNCTION SYSSEP
>  
> Case StrLowCase(!Version.OS_Family) of
>  'unix':  Return, '/'
>  'win':    Return,'\'
>  'macos':  Return,':'
>  'vms': Return, ''
>  Else: Return, ''
> EndCase
>  
> End
> ;---------END

Paul van Delst is correct that "." separates subdirectories in VMS.
However, the most frequent use that I've seen for a case statement like
the above is to separate the directory specification from a file name.
In that case you'd want "]".  To complete Paul's example:

  DISK$NAME1:[PAULV.DIR.SUBDIR.SUBSUBDIR]filename.ext

Dave
--------------
Dave Greenwood                Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab        %STD-W-DISCLAIMER, I only speak for myself