Batch file call not display set message

Hewlett-packard / Compaq nc8230
August 14, 2009 at 13:22:27
Specs: Windows XP, 1 GB

I have Parent file DEL_FOLDER.BAT which call Del_archive.bat file .

Batch file Del_archive.bat contain a question for user to delete or not the archive file like

SET /P Option=Do you really want to delete all previous month Backup folders (Y/N)=: -^>
IF NOT '%Option%'=='' SET Option='%Option%'

if %Option%=='Y' goto :menu1
if %Option%=='y' goto :menu1
if %Option%=='N' goto :menu2
if %Option%=='n' goto :menu2
echo "%Option%" is not valid choice then try again......
goto :menu4

but when I tried to ran DEL_FOLDER.BAT parent file then the question from child file doesn't appear on screen.
CALL Del_archive >%LOG_FIL%

What is missing in the code?

See More: Batch file call not display set message

Report •

August 14, 2009 at 13:33:48
It is because when you do this ">%LOG_FIL%" it is sending the question echo to the log and not the screen.

Modify it so that the log redirection is in the child batch file or put the question in the parent batch file. Better yet redesign it so that there is only one batch file.

Report •

August 14, 2009 at 13:35:26

Report •

Related Solutions

Ask Question