Questions tagged [cmd]

Command Prompt (executable name cmd.exe) is the Microsoft supplied command line interpreter on OS/2, Windows CE, and all Microsoft Windows operating systems. Use this tag for questions regarding programming scripts or on commands available to run from the Command Prompt. Add tags for which version of Windows, and tags describing the task or issue.

Command Prompt (executable name cmd.exe) is the Microsoft-supplied command-line interpreter on Windows NT-based operating systems (including Windows 2000, XP, Vista, 7, 8, 10, Server 2003, Server 2008, Server 2012 and Server 2016), OS/2 and Windows CE. It is the analog of COMMAND.COM in MS-DOS and Windows 9x (where it is called MS-DOS Prompt) systems, or of the Unix shells used on Unix-like systems.

Include additional tags to identify the version of Windows such as , , , etc.

Resources:

See also:

26386 questions
117
votes
3 answers

Equivalent of rm and mv in windows .cmd

I have the following commands in a shell script. I want to convert these lines into a windows cmd file. Can anyone provide input on what is the equivalent for "rm" and "mv" in a windows cmd file? rm -f ${BUILD_ID}/${BUILD_ASIC}*rampatch* mv…
user2341103
  • 2,333
  • 5
  • 20
  • 19
115
votes
3 answers

Difference between Git GUI, Git Bash, Git CMD

What is the difference between Git GUI, Git Bash and Git CMD? I'm a beginner, and for doing my installations I usually find myself using both git bash and git CMD
Rim
  • 1,735
  • 2
  • 18
  • 29
114
votes
18 answers

Ping with timestamp on Windows CLI

On the Windows command prompt cmd, I use ping -t to 10.21.11.81 Reply from 10.21.11.81: bytes=32 time=3889ms TTL=238 Reply from 10.21.11.81: bytes=32 time=3738ms TTL=238 Reply from 10.21.11.81: bytes=32 time=3379ms TTL=238 Are there any…
SuicideSheep
  • 5,260
  • 19
  • 64
  • 117
113
votes
2 answers

XCOPY: Overwrite all without prompt in BATCH

I'm writing a batch program for copying all files newer than the destination from "C:\Users\ADMIN\Desktop" to "D:\Backup". This code is works: xcopy "C:\Users\ADMIN\Desktop\*.*" "D:\Backup\" /K /D /H However, it asks for each existing destination…
FZs
  • 16,581
  • 13
  • 41
  • 50
113
votes
2 answers

What is the difference between % and %% in a cmd file?

I recently included a line similar to this in a .cmd file: for /f %%f in ('dir /b .\directory\*.sql') DO sqlcmd -b -o ".\directory\output\%%f.txt" -i ".\directory\%%f" Originally I had only used %f, and it would work fine when run on the command…
Tyler
  • 1,440
  • 2
  • 11
  • 11
112
votes
7 answers

Windows batch script launch program and exit console

I have a batch script that I use to launch a program, such as notepad.exe. When I double click on this batch file, notepad starts normally, but the black window of the cmd who launched notepad.exe remains in the background. What do I have to do in…
Possa
  • 2,067
  • 7
  • 20
  • 22
112
votes
3 answers

More lines in command window

Is there a possibility to get "more" lines into the command window (Console)? When I debug my programs I output quite a bunch of lines to the window and the beginning of the ouput keeps disappearing out of the range I can scroll back the window so I…
F.P
  • 17,421
  • 34
  • 123
  • 189
112
votes
7 answers

Delete all files of specific type (extension) recursively down a directory using a batch file

I need to delete all .jpg and .txt files (for example) in dir1 and dir2. What I tried was: @echo off FOR %%p IN (C:\testFolder D:\testFolder) DO FOR %%t IN (*.jpg *.txt) DO del /s %%p\%%t In some directories it worked; in others it didn't. For…
vexe
  • 5,433
  • 12
  • 52
  • 81
111
votes
11 answers

How can I debug a .BAT script?

Is there a way to step through a .bat script? The thing is, I have a build script , which calls a lot of other scripts, and I would like to see what is the order in which they are called, so that I may know where exactly I have to go about and add…
Vhaerun
  • 12,806
  • 16
  • 39
  • 38
109
votes
8 answers

How to run Pip commands from CMD

As I understand, Python 2.7.9 comes with Pip installed, however when I try to execute a Pip command from CMD (Windows) I get the following error: 'pip' is not recognized as an internal or external command, operable program or batch file. When I…
algorhythm
  • 3,304
  • 6
  • 36
  • 56
109
votes
8 answers

Can't check signature: public key not found

I try to decrypt file using following command: gpg --output file.txt --decrypt file.pgp File is decrypted successfully but i get an error: "gpg: Can't check signature: public key not found" Any idea, why I get this error?
codelikeprogrammerwoman
  • 1,429
  • 3
  • 14
  • 17
108
votes
12 answers

How do I add to the Windows PATH variable using setx? Having weird problems

I want to modify the Windows PATH variable using setx. The following works at least 50% of the time on Windows 8: setx PATH %PATH%;C:\Python27\;C:\Python27\Scripts\ If it gives the error "the default argument can only be used 2 times", then the…
SerMetAla
  • 4,332
  • 5
  • 31
  • 25
108
votes
2 answers

How to extract or unpack an .ab file (Android Backup file)

I am running an android 4.0.3 device, and I want to extract the back up file created by : adb backup -f ~/data.ab -noapk app.package.name The above line works inside the CMD (windows) and I am able to get the data.ab file inside the '~' directory.…
tony9099
  • 4,567
  • 9
  • 44
  • 73
107
votes
14 answers

Why is the Windows cmd.exe limited to 80 characters wide?

I love stretching my terminal on unix. What is the history or reason behind windows lame command line?
minty
  • 22,235
  • 40
  • 89
  • 106
107
votes
6 answers

Escape angle brackets in a Windows command prompt

I need to echo a string containing angle brackets (< and >) to a file on a Windows machine. Basically what I want to do is the following: echo some string < with angle > brackets >>myfile.txt This doesn't work since the command interpreter gets…
Jason
  • 1,313
  • 3
  • 11
  • 13