Re: If exist batch command not working in WinXp
- From: Ayush <"ayushmaan.j[aatt]gmail.com">
- Date: Fri, 03 Aug 2007 08:45:21 -0600
[Kitroop] wrote-:
Sorry for the delay.
The batch file is as follows:
~~~~
if exist c:\temp\testing\*.* goto yes
goto no
:yes
echo file exists
goto end
:no
echo file not exists
goto end
:end
~~~~
The batch file is in the dir C\temp. There are no files under dir "testing". However the output of the batch file is "file exists".
I have run the same batch file successfully on a dos pc.
Thanks for any help.
~~~~
dir /b /a-d c:\temp >nul 2>nul && GOTO yes
goto no
:yes
echo file exists
goto end
:no
echo file not exists
goto end
:end
~~~~
Good Luck, Ayush.
--
XP-Tips [Speed up menu display] :
http://www.microsoft.com/windowsxp/using/setup/tips/menu.mspx
.
- Prev by Date: Re: Documents and Settings
- Next by Date: Re: Documents and Settings
- Previous by thread: Re: If exist batch command not working in WinXp
- Next by thread: Re: If exist batch command not working in WinXp
- Index(es):
Relevant Pages
|