Computing.Net > Forums > Programming > Batch file call not display set message

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file call not display set message

Reply to Message Icon

Name: hrshelke
Date: August 14, 2009 at 13:22:27 Pacific
OS: Windows XP
CPU/Ram: 1 GB
Product: Hewlett-packard / Compaq nc8230
Subcategory: Batch
Comment:

Hi,

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.
code for DEL_FOLDER.BAT
CALL Del_archive >%LOG_FIL%


What is missing in the code?



Sponsored Link
Ads by Google

Response Number 1
Name: ace_omega
Date: August 14, 2009 at 13:33:48 Pacific
Reply:

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.


0

Response Number 2
Name: hrshelke
Date: August 14, 2009 at 13:35:26 Pacific
Reply:

Thanks.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file call not display set message

Batch file calls second, goto :EOF ends both? www.computing.net/answers/programming/batch-file-calls-second-goto-eof-ends-both/19884.html

Batch file help!!! www.computing.net/answers/programming/batch-file-help/18885.html

batch file parameters question www.computing.net/answers/programming/batch-file-parameters-question/15242.html