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
6
votes
1 answer

Run Wpf application from CMD/Run like calc?

I want to provide my WPF application a custom command so I can start up it from command prompt by not writing it's name but by writing specific command like calc or appwiz.cpl. I have searched google for the same but it is taking me wrong like…
RaviKant Hudda
  • 1,042
  • 10
  • 25
6
votes
1 answer

How to get cmd in Tkinter widget

I'm creating Tkinter GUI and want to add windows CMD into tkinter widget. I would like to use console to connect to database. I did some research and found only pyconsole module, but with some bugs: cls is not going to do what you expect; edit is…
zajcev
  • 81
  • 7
6
votes
2 answers

Using "setlocal enabledelayedexpansion" in cmd prompt

Does setlocal enabledelayedexpansion only work in a batch file? How can setlocal enabledelayedexpansion be used in a cmd prompt?
user15964
  • 2,507
  • 2
  • 31
  • 57
6
votes
1 answer

Running multiple commands simultaneously

I have a script that will run open multiple cmd windows and run different php commands in each window. Unfortunately, my current code waits for the first set of PHP commands to finish before the second set of PHP commands starts, defeating the…
Mohammed naji
  • 983
  • 1
  • 11
  • 23
6
votes
1 answer

PATH variable different when cmd was run through the context menu

I just spent the last hour on trying to find out why the hell my PATH variable wasn't updating for my cmd.exe. Now I figured out that it kind of did update, but only for certain conditions... I updated it via Win+Break -> Change Settings ->…
Forivin
  • 14,780
  • 27
  • 106
  • 199
6
votes
1 answer

What is the maximum length of a Window's command-line (cmd.exe) command?

There are many people asking questions on SO about how to get around the cmd.exe command maximum length. I was wondering what actually is the Windows command-line length limit? Is it different between version of Windows? Does using a 32-bit vs. a…
Jesse Webb
  • 43,135
  • 27
  • 106
  • 143
6
votes
2 answers

Programmatically add route

I write a simple utility that adds a route for specific interface. Code is very simple: using System; using System.Diagnostics; using System.Net.NetworkInformation; using System.Text; class Program { static void Main(string[] args) { …
Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
6
votes
4 answers

When was Batch created?

I know this isn't strictly a programming related question, but I cannot seem to find an answer. In what year was Batch created? Or is it more appropriate to talk about the year CMD was created? In which case - in what year was CMD created? I…
unclemeat
  • 5,029
  • 5
  • 28
  • 52
6
votes
6 answers

Get only ethernet MAC-address via command prompt

I use 'ipconfig /all' or 'getmac /v' to get all NIC physical addresses. But the problem is, generally a computer has more than one NIC card. Also, there are some virtual MAC addresses like Microsoft virtual wifi hotspot NIC which shows only when…
Sourav Ghosh
  • 1,964
  • 4
  • 33
  • 43
6
votes
4 answers

How to close an internet tab with cmd/Python?

So I'm writing a Python script to open internet links using cmd. For example: import os os.system('start http://stackoverflow.com/') os.system('start http://www.google.com/') os.system('start http://www.facebook.com/') After I open them I…
anon
6
votes
2 answers

How can I pass more than 10 arguments in windows batch file or linux shell script

I need to pass more than 10 arguments to a single batch file (shell script) but after the 9th argument it will not work (it will take from beginning) code sample echo Hello! This a sample batch file. echo %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12…
smartechno
  • 470
  • 1
  • 5
  • 18
6
votes
2 answers

Python Script Output Does Not Appear in CMD

While working through the Scrapy tutorial here I noticed that Python scripts are not resulting in any output to the Windows command prompt. I did check the path environment variable to confirm that "c:\python27" and "c:\python27\Scripts" are both…
Dave G
  • 163
  • 1
  • 5
6
votes
1 answer

Run cmd.exe from PowerShell

I am trying to run some unit tests using PowerShell. I have a command that (sort of) works: $output = & $vsTestPath $TestAssembly $logger $TestCaseFilter 2>&1 The problem with this is that the standard out and standard error streams don't come out…
bornfromanegg
  • 2,826
  • 5
  • 24
  • 40
6
votes
1 answer

I can process a file-and-command,file-and-string or few files with FOR /F but no other combinations.Why?

Here's my code: @echo off echo ->minus echo _>underscore rem if this file is used it tries to execute a command echo not-at-all>'notacomand' echo processing two files at once for /f "delims=" %%# in (minus underscore ) do echo %%# echo processing…
npocmaka
  • 55,367
  • 18
  • 148
  • 187
6
votes
2 answers

Windows equivalent of Unix "find" command?

I'd like to be able to search files on a Windows machine using the command line instead of the GUI interface. For example, on Linux, I use: find . -name "*.c" -exec grep -Hn "sqlcommand" {} \; Is there something similar with Windows?
user3772839
  • 265
  • 3
  • 11