Questions tagged [command-prompt]

The command prompt is the string of text that a command-line interpreter displays to you, the user, to prompt you for input in interactive mode. For programs with textual user interfaces in general, not specifically addressing their prompts for user input, see either the CONSOLE-APPLICATION (Microsoft Windows) or TERMINAL (Unices, MacOS 10, and Linux) tags. See COMMAND-LINE or SuperUser for commands invoked by command lines at a command prompt.

This tag covers questions addressing how to control the command prompt in various command interpreters, from sh to COMMAND, and programs that issue command prompts.

Command prompt reference material

4223 questions
30
votes
5 answers

Git command line - know if in submodule?

Is there any way in git to know if you're in a submodule? You can do thinks like git submodule foreach in the parent directory but I can't seem to come up with a generic way to show that you're in a submodule if you're in one, or in any of the child…
Andy Ray
  • 30,372
  • 14
  • 101
  • 138
30
votes
6 answers

"Could not find the main class" when double-clicking .jar file

First: I realize that this issue should be quite simple and lots of people seem to have experienced it. However, it appears my issue may be slightly different from existing posts. I'm using NetBeans to compile a Java application. When it's done…
aardvarkk
  • 14,955
  • 7
  • 67
  • 96
30
votes
8 answers

Extract N lines from file using single windows command

Is there a way to extract/copy the fist X number of lines from a file and input them into another file with a single command using the windows command prompt? I can delete the first X number of lines using: more +X [file_containing data] >…
user1769292
  • 309
  • 1
  • 3
  • 4
30
votes
3 answers

How to return an error code without closing the Command Prompt window?

I am writing a batch file which validates a couple of files. When one of the file isn't valid, I want the batch script to stop and return an error code >0. The code below seem to do the job, but calling "EXIT 2" closes the Command Prompt window in…
Martin
  • 39,309
  • 62
  • 192
  • 278
29
votes
7 answers

How to quickly open the current directory from the command prompt? OS - Windows

There is a need to quickly open the current directory from the command prompt. I know that there is a command explorer. But to enter the full path to the directory is very inconvenient.  For example: exoplorer…
user3366290
  • 447
  • 1
  • 5
  • 7
28
votes
2 answers

On Windows what is the difference between Git Bash vs Windows Power Shell vs Command prompt

I am a Mac guy who is used to Mac's Terminal. Now I am using Windows. Whats the diff between those CLI options? When should I use one over the other? Are there more CLI options that I should consider? What CLI would you use if you were a Mac…
heart.cooks.mind
  • 1,065
  • 1
  • 9
  • 22
28
votes
10 answers

The Python executable is not recognized on Windows 10

I recently installed Python 3.6.3 on my device. When I type python in my cmd window, it gives me this error. I do have the PATH in the environment variables. Path Lists. This should normally fix it, but python is still not recognized.
Rishabh Mandayam
  • 425
  • 1
  • 4
  • 14
27
votes
2 answers

Run Command Line & Command From VBS

I need to run a command to copy a file from one location to another through Command Prompt using a vbs file. this is what I have however it keeps throwing an error at me. 'Dim oShell Set oShell = WScript.CreateObject ("WScript.Shell") oShell.run…
user1590368
  • 379
  • 1
  • 4
  • 4
27
votes
5 answers

How to run Java program in command prompt

I created a Java project to call a Web service. It has one Main java file and another class file. I have used some jar files for HTTP client. In Eclipse it runs fine. I need to run the Java program in command prompt by passing some arguments. In…
Vignesh
  • 2,295
  • 7
  • 33
  • 41
26
votes
6 answers

Color for the PROMPT (just the PROMPT proper) in cmd.exe and PowerShell?

So in Bash you just configure PS1 to add colors to your prompt. I'm talking about the prompt proper, not the color of the foreground (text) or the background. And it's really easy in Bash and it helps a lot if you need to find your commands in a sea…
Lumi
  • 14,775
  • 8
  • 59
  • 92
26
votes
1 answer

What is the difference between x64 Native Tools Command Prompt and x64 Cross Tools Command Prompt?

I have installed 32 bit Visual Studio 2013 on my 64 bit Windows 8.1. I have 5 command prompts: Developer Command Prompt for VS2013 VS2013 ARM Cross Tools Command Prompt VS2013 x64 Cross Tools Command Prompt VS2013 x64 Native Tools Command…
Abhishek Jain
  • 9,614
  • 5
  • 26
  • 40
26
votes
3 answers

Windows Command Prompt: How to pass multi-line string parameters

I have a program that accepts a string parameter. I create a batch file that executes the program and a multiline string paramter. I also have a second parameter after the multiline string. C:\>MyProgram "This is a multiline text" parameter2 When I…
randacun
  • 562
  • 1
  • 6
  • 18
26
votes
4 answers

Alter Git prompt on Windows

I'm using Git on Windows, installed through GitExtensions with MSysGit (latest) having selected "do not modify my Windows prompt" during installation. Now, I would like to be able to modify the default prompt (which by default shows just the branch…
kko
  • 491
  • 1
  • 4
  • 8
25
votes
4 answers

Modify cmd.exe properties using the command prompt

Isn't that nicely recursive? I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more! Here's what I know how to set from .bat: Colors = (color XY) where x and y…
CodexArcanum
  • 3,944
  • 3
  • 35
  • 40
24
votes
5 answers

How to save JMeter Aggregate Report results to a CSV file using command prompt?

I have been using JMeter in GUI mode for composing all the test cases required for load testing my service but for actual testing I need to execute tests in non-GUI mode. How do I save the results of Aggregate report in csv file using…
Harshdeep
  • 5,614
  • 10
  • 37
  • 45