Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 09-24-2007, 08:00 PM
Don Culp
Newsgroup Contributor
 
Posts: n/a
DOS prompt command (long directory names)

In a command window, I use the following prompt command:

prompt $P$_$G

which gives a prompt something like:

C:\mydirectory1\mydirectory2
>_


However, after running certain DOS programs from this command window and
then exiting these programs, each long directory name in the prompt is
shortened to a maximum of 8 characters:

C:\mydire~1\mydire~2
>_


Is there an easy way to restore the original prompt with its long directory
names? I need a method that will work on any path with long directory names,
since I frequently move around among such directories within the command
window. (I know that I can type "cd C:\mydirectory1\mydirectory2" but this
is not convenient, especially when the path is long. Also, sometimes I
cannot deduce the full path name from the shortened version.)

Thanks,
Don Culp


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 09-24-2007, 08:00 PM
  #2 (permalink)  
Old 09-24-2007, 11:40 PM
Pegasus \(MVP\)
Newsgroup Contributor
 
Posts: n/a
Re: DOS prompt command (long directory names)


"Don Culp" <dculp@krell-engineering.com> wrote in message
news:e6qOMAy$HHA.5164@TK2MSFTNGP05.phx.gbl...
> In a command window, I use the following prompt command:
>
> prompt $P$_$G
>
> which gives a prompt something like:
>
> C:\mydirectory1\mydirectory2
>>_

>
> However, after running certain DOS programs from this command window and
> then exiting these programs, each long directory name in the prompt is
> shortened to a maximum of 8 characters:
>
> C:\mydire~1\mydire~2
>>_

>
> Is there an easy way to restore the original prompt with its long
> directory
> names? I need a method that will work on any path with long directory
> names,
> since I frequently move around among such directories within the command
> window. (I know that I can type "cd C:\mydirectory1\mydirectory2" but this
> is not convenient, especially when the path is long. Also, sometimes I
> cannot deduce the full path name from the shortened version.)
>
> Thanks,
> Don Culp


The problem occurs because the programs you run are
16-bit programs which cannot handle LFNs. I am not
aware of any method to restore the LFN notation except
for this work-around. It works like so:
- Create the batch file LFN.bat in c:\Windows.
- Put the following lines inside:
@echo off
pushd "%cd%"
%1 %2 %3 %4 %5
popd
- Save & close the file.
- Instead of invoking your 16-bit programs directly, invoke them
like so. I'm using fastopen.exe as an example.
LFN fastopen.exe parm1 parm2 etc.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 09-25-2007, 10:10 AM
Nightowl
Newsgroup Contributor
 
Posts: n/a
Re: DOS prompt command (long directory names)

Don Culp <dculp@krell-engineering.com> wrote on Mon, 24 Sep 2007:

>Is there an easy way to restore the original prompt with its long directory
>names? I need a method that will work on any path with long directory names,
>since I frequently move around among such directories within the command
>window. (I know that I can type "cd C:\mydirectory1\mydirectory2" but this
>is not convenient, especially when the path is long. Also, sometimes I
>cannot deduce the full path name from the shortened version.)


Hi Don

Do you have Command's completion character and path completion character
functions enabled on your system? If you don't, they enable you to type
just the beginning of a path and then cycle through the matching names.
I'm wondering if that might help here.

I don't run DOS programs so I may not have exactly duplicated your
situation, but I tried an experiment (details below) and it did restore
the long-name prompt for me. Your problem might be different, of course,
but it could be worth a try?

Here's a link explaining the completion keys and how to enable them:
http://pubs.logicalexpressions.com/P...cle.asp?ID=568

Here's a blow-by-blow description of what I tried:

Opened a Command window with Start | Run > cmd
Navigated to C:\Documents and Settings
At this point the prompt was C:\Documents and Settings>

Then I ran Command.com. The prompt then looked like this:
C:\DOCUME~1>. I typed "exit" to end the command.com session. The prompt
still showed as: C:\DOCUME~1>

I typed: cd c:\do (the beginning of the folder name) then pressed my
path completion key. The command line changed to:
C:\DOCUME~1>cd "c:\Documents and Settings".
After pressing Enter the prompt was back to C:\Documents and Settings>

--
Nightowl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy folder with long file names dennist Windows XP 6 09-01-2007 10:40 PM
Delete files w/long names using DOS Tafeille Windows XP 5 05-18-2007 02:00 PM
Long file names Jack Russell Windows XP 3 04-16-2007 12:00 AM
Creating directory and file names starting with a DOT David Medina Windows XP 1 01-31-2007 01:30 PM
MS-DOS long file names Scott Windows XP 9 01-04-2007 02:13 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 05:38 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0