pathfilenamesdosboxlong-filenameslong-path

Invalid DOS path in DOSBox?


I'm trying to install Daggerfall onto my computer.

It asks me for the installation directory; the default is C:\dagger, but I want it to install to C:\Program Files (x86)\Dagger. Problem is it doesn't allow for spaces or pretty much any punctuation, so what I tried to do was replace spaces with underscores.

Enter path screen

Sadly, that didn't work, because now I get the error message, "You have entered an invalid DOS path. Please correct this."

Error screen

Is there a way to designate the installation directory as C:\Program Files (x86) here? If so, how do I do it?


NOTE: This may seem at first like it would be better posted in Arqade, but I feel it's more appropriate for this site since this question has more to do with DOS input than it does at all the game. I'm asking about the directory itself and the way to type it correctly, so it's not 100% game-specific.


Solution

  • DOS did not support long directory names. Usually, we would install games under C:\games or similar. You are limited to 8 characters (excluding the extension).

    Windows knows this, and will present "short" path names for backward compatibility with FAT16.

    Your directory will most likely be C:\PROGRA~1 or similar. An easy way to find out is to run cmd.exe and then go to the directory in question:

    cd "c:\program files (x86)"
    

    Now use the trick from this answer to get the short name:

    for %I in (.) do echo %~sI