Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7788973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:08:54+00:00 2026-06-01T21:08:54+00:00

I made this batch file it works fine exceptfor submenu 4 where it redirects

  • 0

I made this batch file it works fine exceptfor submenu 4 where it redirects ping 192.168.1.1 -n 1 -w !thyme! to NUL instead of echo ping 192.168.1.1 -n 1 -w !thyme!>NUL to %dir101%

@echo off & SETLOCAL EnableDelayedExpansion
title TXTanimation
set dir101=C:\USers\%username%\Desktop\file.bat
goto label1
echo Lets make a text animation
pause
set /p dir101=where will the .bat be saved:
:label1
echo @ECHO OFF > %dir101%
echo: >> %dir101%
:menu
echo 0=Edit important information
echo 1=Display .txt
echo 2=Play sound
echo 3=Close sound player
echo 4=Add nessicary wait between .txt
echo 5=Label point
echo 6=Edit variable
echo 7=Goto point
echo 8=Create IF sentence
echo 9=End it
Set /p choose=which one:

If '%choose%'=='0' (
SEt /p title=What is the title
:LOL101
set /p color=what color do you want type test to experiment with the colors
If '!color!'=='test' goto tester
goto model
:tester
SEt /p test=Please give hexadecimal number type exit to leave:
if '!test!'=='exit' goto LOL101
color !test!
goto tester
:model
echo title %title% >> %dir101%
echo color %color% >> %dir101%
goto menu
)

If '%choose%'=='1' (
set /p dir=what is the dir of your .txt:
)
If '%choose%'=='1' (
echo cls >> %dir101%
echo type %dir% >> %dir101%
goto menu
)
If '%choose%'=='4' (
SEt /p thyme=How much milliseconds 250 is usual:
echo ping 192.168.1.1 -n 1 -w !thyme!>NUL >> %dir101%
goto menu
)
If '%choose%'=='9' (
echo Thanks for making
pause
exit /b
)

Yeh It’s a big program but my error is real small. I could type the template and insert the variable maybe?
But echo ping 192.168.1.1 -n 1 -w !thyme!>NUL >> %dir101% I need it to state the >NUL to be redirected

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:08:56+00:00Added an answer on June 1, 2026 at 9:08 pm

    You simply need to escape the redirection symbol so that it gets echoed instead of being interpreted as redirection.

    echo ping 192.168.1.1 -n 1 -w !thyme! ^>NUL >>%dir101%
    

    Warning: your submenu 0 works as written, but you may be establishing a bad habit that will cause problems for you in the future. You generally should not put a label inside a parenthesized code block. Read (Windows batch) Goto within if block behaves very strangely for an example of how that can cause problems, and the selected answer explains why it can cause problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made this batch file to close explorer before launching Worms because for some
Made this nice little loop for hiding and showing div's, works as a charm
I have made a simple batch file for backing up my repository changes and
Im making a batch game, and made a email screen which looked like this
I have made this batch script which will allow the user to enter a
I have made a batch script which runs a Python application. This batch script
First of all, is this possibly ready-made? Hibernate 3.6 , JDBC batch_size 500 ,
I made this little Cocoa app with a WebView that displays Google Maps in
I made this code with jQuery to fade images ( but not the one
I made this function to verify a user's twitter credentials. Its running on two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.