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.
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%
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
Summary: I have one batch file calling a second. In the second file there is a FOR loop. I exit the FOR loop with a goto :EOF command but this seems to end both batch files. How can I end only the secon...
Summary: As mentioned above the choice command is the obvious alternative, but to use it you would need to use errorlevels - go figure. You could use a for loop to display the choices but I can see no way of e...
Summary: Hi, I am new to batch files. I recently read a batch file. ... IF NOT EXIST %1 (CALL :CMDLine %1) IF NOT EXIST %2 (CALL :CMDLine %2) IF NOT EXIST %2\logs\%3 (CALL :CMDLine %3) IF NOT EXIST %4 (CALL ...