Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A subdirectory Or file x already exists

259 views
Skip to first unread message

BugHunter

unread,
Nov 10, 2020, 10:25:21 AM11/10/20
to

A subdirectory Or file x already exists

Is it possible to suppress this message?
Windows 10.

--
\ / http://nieuwsgroepen.tk/
---------///--------------------------------------
/ \ Bye, BugHunter

BugHunter

unread,
Nov 10, 2020, 12:03:00 PM11/10/20
to
BugHunter <bugh...@com.invalid> schreef op Di 10 Nov 2020 om 16:23:
>
> A subdirectory Or file x already exists
>
> Is it possible to suppress this message?
> Windows 10.


Maybe:

if not exist x md x

?

Auric__

unread,
Nov 10, 2020, 12:24:39 PM11/10/20
to
BugHunter wrote:

> BugHunter <bugh...@com.invalid> schreef op Di 10 Nov 2020 om 16:23:
>>
>> A subdirectory Or file x already exists
>>
>> Is it possible to suppress this message?
>> Windows 10.
>
> Maybe:
>
> if not exist x md x
>
> ?

Yes, that works. Alternately:

md x 2> nul

Your version checks for x. This one doesn't, but supresses the error message.

--
- Everything adults like is stupid.
- But I like you.
- My point still stands.

Auric__

unread,
Nov 10, 2020, 12:25:21 PM11/10/20
to
Auric__ wrote:

> BugHunter wrote:
>
>> BugHunter <bugh...@com.invalid> schreef op Di 10 Nov 2020 om 16:23:
>>>
>>> A subdirectory Or file x already exists
>>>
>>> Is it possible to suppress this message?
>>> Windows 10.
>>
>> Maybe:
>>
>> if not exist x md x
>>
>> ?
>
> Yes, that works. Alternately:
>
> md x 2> nul
>
> Your version checks for x. This one doesn't, but supresses the error
> message.

Correction: supresses *all* error messages.

--
...a truth, for any sufficiently interesting value of reality...

BugHunter

unread,
Nov 11, 2020, 2:14:51 AM11/11/20
to
Auric__ <not.m...@email.address> schreef op Di 10 Nov 2020 om 17:25:
> Auric__ wrote:
>
>> BugHunter wrote:
>>
>>> BugHunter <bugh...@com.invalid> schreef op Di 10 Nov 2020 om 16:23:
>>>>
>>>> A subdirectory Or file x already exists
>>>>
>>>> Is it possible to suppress this message?
>>>> Windows 10.
>>>
>>> Maybe:
>>>
>>> if not exist x md x
>>>
>>> ?
>>
>> Yes, that works. Alternately:
>>
>> md x 2> nul
>>
>> Your version checks for x. This one doesn't, but supresses the error
>> message.
>
> Correction: supresses *all* error messages.


Thank you. What is the function of '2'?

Kenny McCormack

unread,
Nov 11, 2020, 2:34:32 AM11/11/20
to
In article <rog31a$gsn$1...@dont-email.me>,
BugHunter <bugh...@com.invalid> wrote:
...
>Thank you. What is the function of '2'?

https://en.wikipedia.org/wiki/2

(in "2> nul")
Actually, it is something borrowed into recent versions of DOS/Windows,
from Unix. 2 here is the file descriptor of the standard error output
(often referred to as "stderr"). So, this redirects file descriptor 2 to
the nul device.

Another useful application of this is something like:

someCommand > outfile.txt 2>&1

This syntax also is copied from Unix - it means to send the stderr output
to the same log file as the regular (stdout) output. Essentially, the two
output channels are merged into a single stream.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/BestCLCPostEver

BugHunter

unread,
Nov 11, 2020, 4:04:47 AM11/11/20
to
Kenny McCormack <gaz...@shell.xmission.com> schreef op Wo 11 Nov 2020 om 07:34:
> In article <rog31a$gsn$1...@dont-email.me>,
> BugHunter <bugh...@com.invalid> wrote:
> ....
I understand, thanks.

JJ

unread,
Nov 11, 2020, 5:06:23 AM11/11/20
to
On Wed, 11 Nov 2020 07:34:30 -0000 (UTC), Kenny McCormack wrote:
>
> https://en.wikipedia.org/wiki/2

When it comes to education, Wikipedia is better than Google. But it does not
have everything.

> (in "2> nul")
> Actually, it is something borrowed into recent versions of DOS/Windows,
> from Unix.

Actually, DOS and non NT Windows were never involved in this case. DOS never
did have a standard error handle. It only has standard output and input
handles, and none of them can be substituted with a number.
0 new messages