Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to change directory

Status
Not open for further replies.

audioguy16

IS-IT--Management
Sep 5, 2002
5
US
I can see all my drive letters on Windows Explorer but if I go to the command prompt, I am unable to change directory. If you do a cd d:\ for instance, it does nothing. If you do do a dir command on that drive then it lists you all the files under that drive. sounds like a virus? any ideas?
 
Start, Administrative Tools, Event viewer.

We really need to see if there are red events being recoreded about the disk drive.

There are several viri that can do this. Pleae run the Trend Micro and Panda online AV scans from smah's faq: faq760-3862

 
I know nothing about DOS but for some strange reason if you type "cd d:\" at a command prompt in XP will just laugh at you. If you just type D: at the prompt your in business.
 
linney,

????

cd d:\ (assuming you have a D: drive, moved the pointer to the root of D:)

You failed to change drive letters to appreciate what it did.

And, it does not laugh at you, it makes no comment if D: is a valid drive.

Start, Run, cmd

c:
CD D:D:
DIR
 
I have yet to find a book called: "DOS for linney", but I will keep searching.
 
Control Panel, Sound and Audio Devices, you might want to check your setting for the laughing sound.

Starting a CMD session under XP, a CD D:\ will set the pointer to the root.

It just will.
 
bcastner: Not for me. If I'm on the H drive in the rfa dir, (H:\rfa>) and type CD D:\ I'm still at H:\rfa If I CD\ I'm at the root of H: and if I do D:\ I'm at the root of D:.
 
CD does not change drive letters.

From your example:

cd
[Reports some folder on H:)
cd d:(should be no comment)
d:
dir
(should report that you are at d:\)

Am I missing something important here? The CD command does not do a drive letter change and a directory change. It only does (behind the scense) the requested directory pointer change.

You would have to access the drive letter to see if the pointer was moved.
 
I have tried this a million times, and the CD command moves the directory pointer on the non-focused driver every time.

If I then set the drive focus, in the example above to D:\, and do a DIR or just CD it shows the moved focus as I requested.

There was a thread not long ago that no matter what DOS command was issued, the CD command would not honor the request. This proved in the end to be malware.
 
franklin97355,

I will give you full credits in the planned book "DOS for linney."
 
Microsoft Windows XP [Version 5.1.2600]....... "Bcastner" version
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Linney.p4>c:

C:\Documents and Settings\Linney.p4>CD D:
C:\Documents and Settings\Linney.p4>D:

D:\>DIR
Volume in drive D is Tester
Volume Serial Number is E4C8-7D65

Directory of D:
27/10/2003 06:49 <DIR> Confidential
28/05/2004 07:23 <DIR> Documents and Settings

0 File(s) 0 bytes
14 Dir(s) 26,182,180,864 bytes free

D:\>







Microsoft Windows XP [Version 5.1.2600]......Lost "Linney" version
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Linney.p4>d:

D:\>DIR
Volume in drive D is Tester
Volume Serial Number is E4C8-7D65

Directory of D:
27/10/2003 06:49 <DIR> Confidential
28/05/2004 07:23 <DIR> Documents and Settings

0 File(s) 0 bytes
14 Dir(s) 26,182,180,864 bytes free

D:\>


command prompt
thread779-643428

Command prompt problems
thread779-739869

Command prompt problem
thread779-538585
 
linny: That's what bcastner said would happen.
try D:
cd Confidential
C:
cd d:D:
you will now be at root.
 
Isn't the Documents and Settings folder in the Root of a drive along with Program Files, Windows folders etc.? I didn't think you could go any further than D:\>
 
bcastner:
You are right in DOS cd does not change drive letters.
However in the Windows XP Command Shell cd can change drives and directories. You need to use the /D switch.
For example to change from C: to D:\Windows\temp you would type:
C:\>cd /D D:\Windows\temp
Another way to do the same thing is:
C:\>D: cd Windows\temp
 
Bourbaki,

You are absolutey right.

My concern was the fact the the CD command was not working at all, (other than a free chance to poke fun at linney). Linney in his post above covers previous discussions where the CD command did nothing. It can happen.

But thank you for the reminder of the "/D" switch.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top