PC Review


Reply
Thread Tools Rate Thread

command prompt has wrong current directory?

 
 
Oliver Rasto
Guest
Posts: n/a
 
      25th Oct 2005
Hi,

why is it, that when i type 'dir' in the current directory it alaways lists
the contents of the root directory?

i.e. when i type 'dir' in 'c:\winnt\' then it lists the contents of c:\
when i type 'dir' in 'i:\src\php\' then it lists the contents of i:\

When i have a file called 'file1' in directory 'c:\directory1' and i run
'type file1' in that directory then i get 'The system cannot find the
filespecified'. But when i copy the file 'file1' in the root directory 'c:\'
and i run the command 'type file1' in ANY direcotry on the drive it works
OK, even if the file 'file1' is not in the current direcotry.

What is wrong with my system?

Thank you.


 
Reply With Quote
 
 
 
 
foxidrive
Guest
Posts: n/a
 
      25th Oct 2005
On Tue, 25 Oct 2005 15:15:32 +0200, Oliver Rasto wrote:

> Hi,
>
> why is it, that when i type 'dir' in the current directory it alaways lists
> the contents of the root directory?
>
> i.e. when i type 'dir' in 'c:\winnt\' then it lists the contents of c:\
> when i type 'dir' in 'i:\src\php\' then it lists the contents of i:\
>
> When i have a file called 'file1' in directory 'c:\directory1' and i run
> 'type file1' in that directory then i get 'The system cannot find the
> filespecified'. But when i copy the file 'file1' in the root directory 'c:\'
> and i run the command 'type file1' in ANY direcotry on the drive it works
> OK, even if the file 'file1' is not in the current direcotry.
>
> What is wrong with my system?
>
> Thank you.


The shortcut has the working directory as c:\

Type cmd
and then try your commands, after CDing to the correct folder.
 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      30th Oct 2005
In microsoft.public.win2000.cmdprompt.admin foxidrive wrote:

> On Tue, 25 Oct 2005 15:15:32 +0200, Oliver Rasto wrote:
>
>> Hi,
>>
>> why is it, that when i type 'dir' in the current directory it
>> alaways lists the contents of the root directory?
>>
>> i.e. when i type 'dir' in 'c:\winnt\' then it lists the
>> contents of c:\ when i type 'dir' in 'i:\src\php\' then it
>> lists the contents of i:\
>>
>> When i have a file called 'file1' in directory 'c:\directory1'
>> and i run 'type file1' in that directory then i get 'The system
>> cannot find the filespecified'. But when i copy the file
>> 'file1' in the root directory 'c:\' and i run the command 'type
>> file1' in ANY direcotry on the drive it works OK, even if the
>> file 'file1' is not in the current direcotry.
>>
>> What is wrong with my system?
>>
>> Thank you.

>
> The shortcut has the working directory as c:\
>
> Type cmd
> and then try your commands, after CDing to the correct folder.


That does not seem to be the case as I read the OP, though I may be
wrong.

He claims the the CD *is* below the root and yet an unqualified DIR
lists root content. OP, please confirm this.

First seek out any DIR.CMD or DIR.BAT files on the system search
path, although since DIR is internal to CMD, this should not be the
problem.

Possible junk at a registry
...\command processor\
Autorun=
???

DIRCMD env var.? I would not think so, but worth a look.

DOSKEY macro for "dir" ?
 
Reply With Quote
 
ThorstenK
Guest
Posts: n/a
 
      7th Nov 2005
i think the issue is _how_ you run dir.

On a dos prompt in C:\temp
C:\temp>dir
HAS to show you the contents of C:\temp or there is something verry screwed
on your system.

if you run it in a .bat oder .cmd make sure your current directory is
C:\temp
cd /D C:\temp
dir
or dir C:\temp
to see where your current dir is run this at the beginning.
@echo on
cd
echo where am i?
pause

"Oliver Rasto" <(E-Mail Removed)> schrieb im Newsbeitrag
news:2d5c7$435e2ffa$5277719a$(E-Mail Removed)...
> Hi,
>
> why is it, that when i type 'dir' in the current directory it alaways
> lists
> the contents of the root directory?
>
> i.e. when i type 'dir' in 'c:\winnt\' then it lists the contents of c:\
> when i type 'dir' in 'i:\src\php\' then it lists the contents of i:\
>
> When i have a file called 'file1' in directory 'c:\directory1' and i run
> 'type file1' in that directory then i get 'The system cannot find the
> filespecified'. But when i copy the file 'file1' in the root directory
> 'c:\'
> and i run the command 'type file1' in ANY direcotry on the drive it works
> OK, even if the file 'file1' is not in the current direcotry.
>
> What is wrong with my system?
>
> Thank you.
>
>



 
Reply With Quote
 
Mike Jones
Guest
Posts: n/a
 
      7th Nov 2005
ThorstenK wrote:
> i think the issue is _how_ you run dir.
>
> On a dos prompt in C:\temp
> C:\temp>dir
> HAS to show you the contents of C:\temp or there is something verry
> screwed on your system.
>
> if you run it in a .bat oder .cmd make sure your current directory is
> C:\temp
> cd /D C:\temp
> dir
> or dir C:\temp
> to see where your current dir is run this at the beginning.
> @echo on
> cd
> echo where am i?
> pause
>
> "Oliver Rasto" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:2d5c7$435e2ffa$5277719a$(E-Mail Removed)...
>> Hi,
>>
>> why is it, that when i type 'dir' in the current directory it alaways
>> lists
>> the contents of the root directory?
>>
>> i.e. when i type 'dir' in 'c:\winnt\' then it lists the contents of


>> c:\ when i type 'dir' in 'i:\src\php\' then it lists the contents of
>> i:\
>>
>> When i have a file called 'file1' in directory 'c:\directory1' and i
>> run 'type file1' in that directory then i get 'The system cannot
>> find the filespecified'. But when i copy the file 'file1' in the
>> root directory 'c:\'
>> and i run the command 'type file1' in ANY direcotry on the drive it
>> works OK, even if the file 'file1' is not in the current direcotry.
>>
>> What is wrong with my system?
>>
>> Thank you.


there's a DOSKEY synonym dir which runs "dir c:\" ?

try typing in (space)dir instead


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong current directory Alan Microsoft Excel Programming 3 18th Jul 2008 10:03 PM
tweak the current command prompt josh Windows XP General 6 4th Feb 2006 04:14 PM
Invalid Directory from a command prompt =?Utf-8?B?c3RldmUwMmE=?= Windows XP General 0 2nd Aug 2005 10:06 PM
how to open current folder in command prompt? jd Microsoft Windows 2000 2 5th Sep 2004 08:40 PM
Command Prompt to a Directory sailingdan Microsoft Excel Programming 0 23rd Jun 2004 05:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:58 PM.