I believe on post-Win98 machines (not sure if DOS on Win98 does this) that all path references can have spaces in them (and longer names).
Here's some examples to get you familiar:
Example 1:
* Create a shortcut to Microsoft Word (right click on executable, hold, drag to desktop, release, select Copy as Shortcut).
* Right click on shortcut, click on Properties, go to the middle tab, where the Target should read
C:\Program Files\Microsoft Office\Office11\winword.exe or
"C:\Program Files\Microsoft Office\Office11\winword.exe"
(or something like that)
If you double-click on the shortcut, Word will just boot up, but if you give it a file name after the executable, it will open that file when it boots up:
"C:\Program Files\Microsoft Office\Office11\winword.exe" C:\mydoc.doc
But if you want to specify a file name with spaces, you have to add double-quotes:
"C:\Program Files\Microsoft Office\Office11\winword.exe" "C:\my family document.doc"
If you don't put the double quotes around your filename, it will assume you are passing it three files, one called
C:\my, another called
family, and a third called
document.doc.
And, the original DOS naming conventions are still supported.
C:\Progra~1\Micros~1\Office~1\winword.exe C:\myfami~1.doc
Example 2:
* Boot up a DOS prompt
* Type cd \
* Type cd C:\Program Files
You'll see it correctly changes to
C:\Program Files. Although you don't need double-quotes, you can put them in too. Some programs are smart enough not to require them if the context is right.
So I don't know exactly what the context of your path references is but you should just be able to forget about the ~1 notation from now on, especially for a batch file which is basically just a bunch of DOS programs executing. In your code, or commands, just replace the ~ notation with the full paths, and put quotes around the whole path. Let me know if this works for you, if not maybe there's a specific issue of which I haven't thought yet...which is entirely possible