How to pass Yes automatically in a batch script?
Posted: 10 Dec 2018 11:19
Hi,
I have this piece of code.
SET "NASS=\\abc"
SET "TEMPDIR=%NASS%\CU\OR"
PUSHD "%TEMPDIR%"
forfiles /s /m *.* /c "cmd /c Del @path" /d -90
POPD
While executing, it asks \\abc\CU\OR\*, Are you sure (Y/N) ? and the job stops there till the input is provided.
Now how to pass Y in the above code?
I have this piece of code.
SET "NASS=\\abc"
SET "TEMPDIR=%NASS%\CU\OR"
PUSHD "%TEMPDIR%"
forfiles /s /m *.* /c "cmd /c Del @path" /d -90
POPD
While executing, it asks \\abc\CU\OR\*, Are you sure (Y/N) ? and the job stops there till the input is provided.
Now how to pass Y in the above code?