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 7032133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:53:41+00:00 2026-05-28T00:53:41+00:00

I have a batch file with for example cd c:\test But there is more

  • 0

I have a batch file with for example

cd c:\test

But there is more then this in the batch, it’s just an example.

So, if I call it from explorer, I see a cmd window for short time and then it will be closed. How can I avoid this?

I tried to call PAUSE at the end, but for me it’s cheating 🙂

UPD:

just imagine, I’m lazy and need to call different batches from different directories very often. That’s why I wanted to have my batches in just one diretory calling another batches, but I also want to see results after execution

  • 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-05-28T00:53:42+00:00Added an answer on May 28, 2026 at 12:53 am

    I presume you are double clicking on the batch file from within Windows Explorer (or else right clicking and selecting open). If so, then you are getting the expected behavior. When you double click on any executable, the window should close once the executable completes.

    Putting a PAUSE before the end is the appropriate technique to allow you to see the results before the Window closes. It is not cheating.

    If you want the command window to remain open after the batch file terminates, then you can use an appropriately configured shortcut.

    Assume the batch file is C:\MyPath\TEST.BAT. You create a shortcut for it, right mouse click on the shortcut, and edit properties. Modify the Target: as follows:

    cmd /k "C\MyPath\TEST.BAT"
    

    If you double click on the shortcut, TEST.BAT will run and the command window will remain open after it terminates. But now the command window will remain open indefinitely until you explicitly close it.

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

Sidebar

Related Questions

For example, suppose I have a batch file called 'test.cmd' and it simply contains:
This batch file releases a build from TEST to LIVE. I want to add
In the following example, I want to call a child batch file from a
I have the next batch file, but its matching by file name. This time
I have a Batch file which will call a Powershell Script : BATCH FILE
This is a strange problem. I have a batch file where I have two
Background I have a Spring batch program that reads a file (example file I
For example, you have a rename command in a batch file, and you want
I have the following values in a DOS batch file (for example...): ..\Apple\Jones ..\Banana\Smith
I am using the batch file example below that I got from batch file

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.