Batch file, Extended Error 183

D

Dennis Allen

Hi. I have a batch file that calls another batch file (ex: if
exist.temp.bat call temp). On my XP SP2, I get "Extended Error 183".
Seems to still execute properly. What is this error message and how do
I get rid of it? Any advice is appreciated...Dennis
 
T

Torgeir Bakken \(MVP\)

Dennis said:
Hi. I have a batch file that calls another batch file (ex: if
exist.temp.bat call temp). On my XP SP2, I get "Extended Error 183".
Seems to still execute properly. What is this error message and how
do I get rid of it? Any advice is appreciated...Dennis
Hi

From error.h Win32 API
---------------------------------------
#define ERROR_ALREADY_EXISTS 183


And from this Google newsgroup archive search
http://groups.google.co.uk/groups?q="Extended+Error+183"&start=0&scoring=d
it is very often caused by trying to create a folder that
already exists.
 
D

Dennis Allen

Thanks for the reply. I tracked down the problem. Here's my two sample
batch files, install.bat and temp.bat:


@echo off
rem Install.bat
if %1.=={}{}{}. goto begin
command /e:2048 /c %0 {}{}{}
goto quit

:begin
call temp.bat
:quit


@echo off
rem temp.bat
SET PRG=c:\spiral\job
IF NOT EXIST c:\spiral\*.* MD c:\spiral
IF NOT EXIST c:\spiral\job\*.* MD c:\spiral\job


Install.bat uses command /e to make sure there is enough space for
needed environment variables (the actual install.bat uses a lot of
them). Unfortunately, I think command /e is also making IF NOT EXIST
skip a beat, causing MD to execute regardless.

Is this a bug? Is there a way to code around it? Or is there another
way to ensure enough space for environment variables?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top