delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/18/06:32:53

Date: Sat, 18 Jan 2003 13:30:06 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <8011-Sat18Jan2003133005+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
-reply-to: <10301172011 DOT AA24152 AT clio DOT rice DOT edu> (sandmann AT clio DOT rice DOT edu)
Subject: Re: mkdir in windows NT (fwd)
References: <10301172011 DOT AA24152 AT clio DOT rice DOT edu>
Reply-To: djgpp-workers AT delorie DOT com

> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Fri, 17 Jan 2003 14:11:16 -0600 (CST)
> 
> > I have a question about mkdir in Windows.
> > 
> > Under windows NT, it seems that "mkdir ../test" won't work,
> > and I have to use "mkdir ..\test". I wonder if it is designed
> > this way for "mkdir.exe"?
> 
> This does look like bizzare behavior to me - and it seems to be
> related to the fact that mkdir (and rmdir) are built into cmd.exe
> shell.

Right.  Builtin commands of DOS/Windows shells generally don't
support forward slashes.

> Try this: copy mkdir.exe to md1.exe; then the command
> md1 ../test      
> works fine.

We have the gmkdir.exe ``symlink'' precisely for this purpose.  From
the shell's prompt, invoke `gmkdir', not `mkdir'.

> Note that even fully qualifying the name doesn't help:
> 
> c:\djgpp\bin\mkdir.exe ../test
> Invalid switch - /test
> 
> So this seems some strange limitation in cmd.exe and command.com;
> both do this (even inside batch procedures).  It doesn't do this 
> from bash.

Try this instead, it might help:

    mkdir "../test"

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019