Converting path to short form?

  • Thread starter Thread starter Terry Pinnell
  • Start date Start date
T

Terry Pinnell

I used to know some trick for converting a long path name in XP to its
'DOS' short name equivalent. It was something to do with dragging it
or pasting it into an XP Command Prompt window. But I'm darned if I
can recall it now. Anyone able to help please? Objective is to get
this into short form, as I think the old program I'm working with
expects its INI file to contain a reference in that form.

C:\Program Files\Mozilla Firefox\firefox.exe
 
Terry Pinnell said:
I used to know some trick for converting a long path name in XP to its
'DOS' short name equivalent. It was something to do with dragging it
or pasting it into an XP Command Prompt window. But I'm darned if I
can recall it now. Anyone able to help please? Objective is to get
this into short form, as I think the old program I'm working with
expects its INI file to contain a reference in that form.

C:\Program Files\Mozilla Firefox\firefox.exe

Take the first six characters and add ~1 (or ~2 if ~1 already exists.

C:\Progra~1\Mozill~1\firefox.exe

But I doubt if that's the problem. Why not describe the problem in detail?

--
Frank Saunders, MS-MVP OE
Please respond in Newsgroup. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com/security/protect/
 
Terry Pinnell said:
I used to know some trick for converting a long path name in XP to its
'DOS' short name equivalent. It was something to do with dragging it
or pasting it into an XP Command Prompt window. But I'm darned if I
can recall it now. Anyone able to help please? Objective is to get
this into short form, as I think the old program I'm working with
expects its INI file to contain a reference in that form.

C:\Program Files\Mozilla Firefox\firefox.exe

You can do it like this from a Command Prompt:

cd /d "c:\Program Files\Some Application"
echo quit | debug
echo The short path is %cd%

However, as Frank suggested, you may be trying to cure a
symptom by playing with short file names. Fixing the cause
of the problem might be a better idea.
 
Dir /X from Command Prompt.

/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.

--
Ramesh, Microsoft MVP
Windows XP Shell/User

Windows XP Troubleshooting
http://www.winhelponline.com
 
The command dir /x displays short & long file names. It does
not display the short path name.
 
Pegasus \(MVP\) said:
You can do it like this from a Command Prompt:

cd /d "c:\Program Files\Some Application"
echo quit | debug
echo The short path is %cd%

However, as Frank suggested, you may be trying to cure a
symptom by playing with short file names. Fixing the cause
of the problem might be a better idea.
Thanks all. The manual method is easy enough, and gave me
c:\progra~1\mozill~1\firefox.exe

(The dir /x method also gets me there, but only by one stage per
folder.)

I tried it for curiosity and future reference, but I can't get
Pegasus's method above to work. Here's a screenshot:
http://www.terrypin.dial.pipex.com/Images/ShortPath1.gif
BTW, what is the /d switch for please?

Anyway, the short form didn't fix my problem.

I didn't want to bore with its obscure details, but as you asked...
The file FTW.INI is for a 1999 genealogy program called Family Tree
Maker version 6. It's quite long, but in its default form starts like
this:

[Online]
ProductCode=66796
UniqueID=32de4377737f8f02a755c7c8
InternetMenuSet=True
BrowserPath=C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
BrowserType=32
;Browser=4
[Options]
;WFTAddSources=FALSE
;GenReportsMemSize=16777216
etc

I was trying to get it to let me use my Firefox browser, instead of
its offerings of Netscape Navigator, Netscape Communicator or MSIE4.
(The latter choice gave the current entry above.)

I've (hopefully) solved the problem by ordering an upgrade to FTM
2006!

Now - see why I didn't go into all that? <g>
 
When you type cd /d at the Command Prompt then you'll see
that the /d switch lets you switch drives.

debug.exe is a 16-bit program which launches the NTVDM
(NT Virtual DOS Machine) and causes short directory names
to be displayed - at least on all the machines I have played
with. Yours appears to be different, for reasons unknown.
In your case it does not really matter.


Terry Pinnell said:
Pegasus \(MVP\) said:
You can do it like this from a Command Prompt:

cd /d "c:\Program Files\Some Application"
echo quit | debug
echo The short path is %cd%

However, as Frank suggested, you may be trying to cure a
symptom by playing with short file names. Fixing the cause
of the problem might be a better idea.
Thanks all. The manual method is easy enough, and gave me
c:\progra~1\mozill~1\firefox.exe

(The dir /x method also gets me there, but only by one stage per
folder.)

I tried it for curiosity and future reference, but I can't get
Pegasus's method above to work. Here's a screenshot:
http://www.terrypin.dial.pipex.com/Images/ShortPath1.gif
BTW, what is the /d switch for please?

Anyway, the short form didn't fix my problem.

I didn't want to bore with its obscure details, but as you asked...
The file FTW.INI is for a 1999 genealogy program called Family Tree
Maker version 6. It's quite long, but in its default form starts like
this:

[Online]
ProductCode=66796
UniqueID=32de4377737f8f02a755c7c8
InternetMenuSet=True
BrowserPath=C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
BrowserType=32
;Browser=4
[Options]
;WFTAddSources=FALSE
;GenReportsMemSize=16777216
etc

I was trying to get it to let me use my Firefox browser, instead of
its offerings of Netscape Navigator, Netscape Communicator or MSIE4.
(The latter choice gave the current entry above.)

I've (hopefully) solved the problem by ordering an upgrade to FTM
2006!

Now - see why I didn't go into all that? <g>
 
Terry Pinnell said:
Pegasus \(MVP\) said:
You can do it like this from a Command Prompt:

cd /d "c:\Program Files\Some Application"
echo quit | debug
echo The short path is %cd%

However, as Frank suggested, you may be trying to cure a
symptom by playing with short file names. Fixing the cause
of the problem might be a better idea.
Thanks all. The manual method is easy enough, and gave me
c:\progra~1\mozill~1\firefox.exe

(The dir /x method also gets me there, but only by one stage per
folder.)

I tried it for curiosity and future reference, but I can't get
Pegasus's method above to work. Here's a screenshot:
http://www.terrypin.dial.pipex.com/Images/ShortPath1.gif
BTW, what is the /d switch for please?

Anyway, the short form didn't fix my problem.

I didn't want to bore with its obscure details, but as you asked...
The file FTW.INI is for a 1999 genealogy program called Family Tree
Maker version 6. It's quite long, but in its default form starts like
this:

[Online]
ProductCode=66796
UniqueID=32de4377737f8f02a755c7c8
InternetMenuSet=True
BrowserPath=C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
BrowserType=32
;Browser=4
[Options]
;WFTAddSources=FALSE
;GenReportsMemSize=16777216
etc

I was trying to get it to let me use my Firefox browser, instead of
its offerings of Netscape Navigator, Netscape Communicator or MSIE4.
(The latter choice gave the current entry above.)

I've (hopefully) solved the problem by ordering an upgrade to FTM
2006!

Now - see why I didn't go into all that? <g>

I would have expected changing that BrowserPath to work. Did you try
rebooting?

--
Frank Saunders, MS-MVP OE
Please respond in Newsgroup. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com/security/protect/
 
Frank Saunders said:
I would have expected changing that BrowserPath to work. Did you try
rebooting?

Not yet. That's another issue! I'm avoiding reboots for a while, due
to various problems with cloning partitions, as I've posted recently
here in 'Booting to a cloned OS') and in
microsoft.public.windowsxp.perform_maintain
under 'Why this configuration not working?'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top