PDA

View Full Version : Help in command prompt under windows.


Dek
04-08-2002, 02:24 PM
I am not able to move folders in command prompt for drive d. This works perfectly in drive c.

For example commands like

D:\>cd programs
Invalid directory

D:\>cd tutorials
Invalid directory

Both directories definitely exist but I cannot go to them.
I posted a similar message along time ago, but no one offered me a solution. I need to move between folders because I use the command prompt to execute program code in Java. I had not been programming for a while so I let the matter rest but know I need to, please help.

I am running Windows XP.

Rick
04-08-2002, 02:54 PM
Not knowing exactly what Operating system your working in.
You may be running into the DOS 8.3 file name limit.

In short Dos Only supports file and folder names with 8 character file names and 3 character extensions.
Under win9x ana above the following folder is correct.
C:\Program Files>
But Under DOS it would look like this
c:\Progra~1

So In a dos command prompt to change to this folder the command would like this
cd\progra~1
and for your tutorials folder
cd\tutori~1

Any time a folder / filename exceeds the 8.3 rule under dos
You need to substitute everything after the 6th character with ~1

If you have more than one file or folder with the same first 8 characters
then you will find the ~1 can also be ~2 ~3 and so on.

Example
tutorials
tutorials basic
tutorials Extended
Would be

cd\tutori~1
cd\tutori~2
cd\tutori~3



[This message has been edited by Rick (edited 04-08-2002).]

mjc
04-08-2002, 03:00 PM
Ok, I did a search and found your old post...about the only thing I can think of is to dreate a shortcut (right click on th file and select "Create Shortcut") to one of the ones that does work and place the shortcut on your desktop and use it...


http://www.pcguide.com/ubb/Forum15/HTML/000860.html

Or try running "cmd.exe" from the Run menu. The "command.exe" does have the long filename restriction. It seems that XP has two different command prompts, depending on what command you issue...cmd.exe and command.exe.
------------------
mjc
Links list:Computer Links (http://www.dreamwater.org/tech/mjc/index.htm)

Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.




[This message has been edited by mjc (edited 04-08-2002).]

Dek
04-08-2002, 03:50 PM
I have done what rick has said and this works.

Why?

I am running Windows XP.
I start the command prompt from start/run and type command and it loads the default command window????

Also this command prompt does not allow me to cycle through previous commands I used to be able to do this with the 4 arrow keys.

I remember I had to change the DOSKEY or something????
Any ideas

mjc
04-08-2002, 04:07 PM
I start the command prompt from start/run and type command and it loads the default command window????

DO NOT type COMMAND in the run box type CMD.EXE instead....

It will give you long filenames, command rollback and all the other more modern convenience fetures.

Is there any specific reason that you [/b]must[/b] run command from the run box and not just use the working shortcut form the Start menu?


------------------
mjc
Links list:Computer Links (http://www.dreamwater.org/tech/mjc/index.htm)

Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.