DOS: if exist
Technology February 1st, 2006@echo off
REM #######################
REM # Set Object Value
REM #######################
SET filename=D:\temp\test.bat
SET RETURN_MSG=
REM #######################
REM # Check object exist
REM #######################
if exist %filename% goto FOUND
SET RETURN_MSG=MESSAGE: Object not found
goto NOTFOUDN
:FOUND
SET RETURN_MSG=MESSAGE: Object found
echo %RETURN_MSG%
goto EXITOUT
:NOTFOUDN
echo %RETURN_MSG%
goto EXITOUT
:EXITOUT
Popularity: 7% [?]
Want to work hard and play hard?
Get Inside Story by E-Mail
Subscribe with Your Favorite Reader
Save To Del.icio.us | Digg This | Stumble It
Save To Del.icio.us | Digg This | Stumble It
Leave a Comment
Comment PolicyA comment will be DELETED/MODIFIED if:
- Contains links to splogs or MFA (Made For Adsense) sites
- Contains links to a non-blog related sites
- Contains racists, drugs or illegal statements and stuff like that
- Adds no value to the discussion






