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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:13:33+00:00 2026-06-01T08:13:33+00:00

I want to start a command prompt but don’t want any output from it.

  • 0

I want to start a command prompt but don’t want any output from it. So I am starting it as –

cmd /q dir

which works fine but one cmd.exe doesn’t exit. If I use this-

cmd /q /c  dir

I can see output of dir command which I don’t expect to see

  • 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-01T08:13:34+00:00Added an answer on June 1, 2026 at 8:13 am

    The /Q option does not disable output, it only turns ECHO OFF. It is not normally needed, but there are occasions where it becomes useful.

    To disable all non-error output, simply redirect the stdout to nul (>nul or 1>nul). If you also want to disable error output, then stderr must also be redirected (2>nul).

    >nul 2>nul cmd /c dir
    

    Addendum

    Andriy M has a good point with his comment on the question. You can probably execute your command directly without going through CMD. Redirection would still work the same.

    >nul 2>nul yourCommand.exe
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to start the Microsoft SQL Server 2008 services from command prompt. how
i want to call the command prompt command using Process.Start and then using StandardOutput
Runtime.getRuntime().exec(cmd /c start rake.bat); I want it to run rake.bat then close the command
I want to start tomcat on command prompt in linux and want to run
i want to open command prompt through java and perform some task. but i
Question: I want to control cmd.exe from winforms. I DO NOT mean every command
I want to run python code from C# through command Prompt.The Code is attached
Using Hlint via the command prompt works for me, but I have problem trying
I want to start findBugs on existing project (on command line there are currently
I'm trying to start the del command using System.Diagnostic.Process. Basically I want to delete

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.