Batch file, Extended Error 183

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

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
 
Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

Dennis Allen wrote:

> 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=%22Extended+Error+183%22&start=0&scoring=d
it is very often caused by trying to create a folder that
already exists.



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 
Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

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?