How do I check if a bunch of files exist in my script? I want my script to perform some add the files if its not present or just ignore and proceed with the rest of the code. This is what I have writtes:
if not exist qapi/qapi*.h (
@ECHO OFF
CD %~dp0\..\..
ECHO %CD%
SET TOP_IOE_SW= %CD%
ECHO %TOP_IOE_SW%
SET BUILD_DIR=%TOP_IOE_SW%/build/ms
icacls * /q /c /t /grant Users:F
mkdir include\qapi
xcopy /Y qapi_export\qapi*.h include\qapi
xcopy /Y qapi\common\qapi*.h include\qapi
xcopy /Y core\api\qapi*.h include\qapi
xcopy /Y qapi\build include\build\
)
else (
call :next)
:next
////the rest of the code comes here///
When I run the script, it keeps prompting me to overwrite these files. How can I have this done without the prompt?
Thanks