in reply to RE: Converting all occurrences of \ to \\ oddity
in thread Converting all occurrences of \ to \\ oddity

This is true on some Win32 platforms, but not Win2k. Win2k uses a forward slash to start a flag, and does not look for a space before that slash, causing a problem with using forward slashes in your paths. On the other hand it works great for NT4. Just beware if (when) you change to Win2k.
  • Comment on RE: RE: Converting all occurrences of \ to \\ oddity

Replies are listed 'Best First'.
RE: RE: RE: Converting all occurrences of \ to \\ oddity
by tye (Sage) on Sep 12, 2000 at 21:08 UTC

    Actually, it is a problem under Win NT as well. But it is only a problem if you pass the file name on the command line to a program that will interpret the / as you have described. Many, many Win NT programs don't have this problem and even cmd.exe supports using / as a directory separator (but cmd.exe's built-in commands don't). But many (most?) programs from Micrsoft interpret / as a command-line option. If you don't pass the filename to an external command, then the / should always work.

    Based on your wording, it sounds like the problem under Windows 2000 is similar. I haven't played with W2K, so I'd appreciate some clarification.

    Note that there are at least two places in the Win32 API where / can't be used in place of \: Registry calls and DefineDosDevice().

    Update: ...and for the first case, that is why we have Win32::TieRegistry::Delimiter("/").

            - tye (but my friends call me "Tye")