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

  • Home
  • SEARCH
  • 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 8224123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:57:04+00:00 2026-06-07T14:57:04+00:00

I have two scripts. First script is asking user for some input and calling

  • 0

I have two scripts. First script is asking user for some input and calling another script giving it the input as a parameter. Second script is again asking user for the same input.

first.bat

set /p input=Insert your input:
call second.bat %input%

second.bat

if %1 == "Y" input=%1 & goto skipInput
set /p input=Insert the same input:

:skipInput
echo Skipped user input

Is it possible to set second user input with first input value without user pressing the same input value? Problem is that set /p in second.bat cannot be skipped like in upper example.

Updated solution:

first.bat

set /p input=Insert your input:
echo %input% | (cd path/to/file & second.bat)
echo %input% | (cd path/to/file & second.bat)
pause >nul
  • 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-07T14:57:06+00:00Added an answer on June 7, 2026 at 2:57 pm

    I’m not 100% sure what you are trying to do, but maybe this

    First.bat

    set /p input=Insert your input:
    call second.bat %input%
    

    Second.bat

    if %1=="Y" set input=%1
    

    Which will set the variable input in the second script to the value of input in the first script.

    Update

    If you only have access to the initial batch that calls the others then try this

    @echo off
    set /p input=Insert your input:
    echo %input%| second.bat
    pause >nul
    

    After running that I managed to get the prompt in the second batch which just has the set /p line to be filled in using the pipe redirection.

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

Sidebar

Related Questions

I have two python scripts. First python script calls second. But seconds python script
I have two python scripts. First one is just a script waiting for user
I have two scripts that are called in one program, the first script creates
Suppose I have two scripts. The first one puts (with mv command) some files
I have two tcl scripts. I want to run the second script when the
I have two shell scripts. One script dynamically creates the call to the second
I have two scripts running on the same page, one is the jQuery.hSlides.js script
I have written two scripts where one script calls subprocess.Popen to run a terminal
I have two scripts that I call with two PHP include() calls. The first
I have two simple scripts, the first shows a div when clicked. Inside that

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.