Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [cmd.exe]

cmd.exe, or the Command Prompt, is the default command-line interpreter for many Microsoft-created operating systems.

2
votes
2answers
1k views

Windows 10 high CPU usage unless task manager is opened

A desktop gadget I am using indicates 100% CPU usage. But every time I open Task Manager to find the cause, it suddenly drops to 10-15%. If i close it, it spikes back to 100%. Also Command Prompt is ...
0
votes
1answer
107 views

how to chain batches properly?

I'm trying to biuld a chain from batches but something prevents to start my 2nd batch from executing because it brings stuff from the first batch (I guess) this is my folder structure: %~dp0..\× H\ ...
0
votes
1answer
160 views

how to prompt for number to create folders based on the input?

I have a BATCH.BAT and when I run it I need to ask my how many folders I want to create: echo How many folders you want? (enter below) SET /P "ANSWER=" then I need to input number (that is not ...
0
votes
0answers
60 views

how to send whole :MENU2 into .txt file?

is it possible to make output from whole :MENU2 label of a batch (from within a batch) into .txt? :menu cls echo welcome echo label1 loading... timeout /t 9 > nul goto ...
0
votes
1answer
612 views

Unable to open a folder with space in cmd [duplicate]

I'm unable to open a folder in cmd. The folder name has a space The script that I'm working on is start D:\My Data which does not work. However start D:\MyData seems to work but I need the space ...
0
votes
1answer
45 views

Find a file under a partially known folder path

I am very new to batch files. I am trying to write a script to find this file: <A>\Org\App\<B>\<C>\SQL Scripts\Miscellaneous\CRErrorFinder.exe where A is any drive, B a folder ...
1
vote
2answers
357 views

Inserting \r\n into parameter on Windows

I'm using FFmpeg on Windows where I need to insert an \r\n in a parameter itself. ffmpeg … -headers "X-Test: Test\r\nX-Test-2: Test 2\r\n" … While this will work fine under Linux and such, it does ...
1
vote
1answer
45 views

How to extract final line from this IP list?

I am trying to get the external IP address of a network to see if it is on the same network as other PCs, but my script isn't working. My main problem is that: No matter what I do I can't seem to get ...
0
votes
3answers
526 views

how to use output as VARIABLE and put trimmed value into CLIP?

can anyone teach me the right way? here is my attempt code: @echo off SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION "%~dp0..\x64\mediainfo.exe" --Inform=General;%%UniqueID/String%% "%~dp0..\files\...
0
votes
2answers
1k views

What is the alternative for source command in cmd?

I want to run the Windows (Command Prompt) equivalent of source myvenv/bin/activate so as to activate and enter into my virtual environment.
-1
votes
2answers
82 views

How to bring old instance of calculator on top of every other window?

I would like to open the calculator. If calculator already opened then want to bring in front of all other windows... without using any coding of hotkey. I used the following script: @echo off ...
0
votes
0answers
90 views

How to change perforce default command console window to ConEmu console

I want to change the default command prompt in the Perforce. I want to have like, When ever we try to open a directory in perforce via command window the default is cmd.exe, But I want to replace/...
1
vote
0answers
24 views

cmd.exe doesn't keep preferences when pinning to start menu

Normally, I launch cmd.exe by typing cmd in the Start menu and hitting Enter. I have changed the preferences of cmd such as font and color. I searched for cmd.exe and pinned it to the Start menu (...
0
votes
1answer
45 views

how to padd output of the SET /P?

I am using this simple menu in cmd where I padded my ECHOs with TAB key: :MENU ECHO select this by pressing 0 ECHO( ECHO select this by pressing 1 ECHO( SET /P ANSWER="press something:" is ...
0
votes
2answers
602 views

how to navigate in range of parent folder without full path?

is there a way how to navigate to a program that is in different folder of the parent directory without using full path? atm I have a batch here: FOLDER 1\BATCHES\batch1.bat which uses a program ...
0
votes
1answer
31 views

Cannot use command promt [duplicate]

Mt command prompt will not run any default windows commands because I changed my PATH to jdk (Java Development Kit). Is there a way to fix this without changing the PATH back? If there isn't what ...
0
votes
1answer
156 views

Batch File: Loop Not Outputting Inputted Variable Value to External File

The problem lies in this part of the code: for /l %%x in (1, 1, %num%) do ( set /p "inp=Enter Ext of PC: " echo pc-%inp%x>>"Myfile.log" ) Here is the full code: @ECHO OFF :: +++++++++++...
0
votes
1answer
35 views

How to write Latin special symbol to CMD?

How to write this "Ƭ"(It looks like normal T but it isn't normal T!) symbol to CMD. It automatically changes to "?" I tried changed Encoding with chcp but still changes to "?" To clarify for the OP, ...
1
vote
1answer
1k views

Run Python Script with Powershell by default instead of Cmd (Windows 10)

I'm on Windows 10 using Python 3.6, and I notice that whenever I double click on a Python file (for example, from File Explorer): It runs inside a command prompt window! I would prefer if it were to ...
0
votes
0answers
27 views

Output stream redirected from `GVim` to `Conemu terminal` instead cmd.exe

I would like to stream output that appears after code execution in Gvim to Conemu (Cmder). Right now stream is redirected to cmd.exe and new window pop up every time I run a program. I include cmder ...
1
vote
1answer
43 views

Command output not working after changing codepage

I've found a rather weird issue while investigating the twisted world of character encoding. In Windows, if I type 'tree' the command works as expected but if I then type 'chcp 65001' (which is UTF-8) ...
0
votes
2answers
98 views

Trying to use an environment variable in a .cmd script, getting the message “\Windows was unexpected at this time”

I need to access a windows environment variable in a .cmd script, it looks something like this, following the documentation on microsoft's support: if "%MY_ENV_VAR%" == "" ( echo You must set your ...
1
vote
1answer
127 views

how to join “IF FOR batch” with “FOR DELIMS batch”?

here is 1st part of my script: @echo off cd /D "E:\[0] EE\feed\" if exist "*.ss" ( if not exist "O.ss" ( FOR %%A IN (*.ss) DO ( IF /I NOT "%%~A"=="O2.ss" REN "%%~A" "O.ss" > nul 2>&...
1
vote
1answer
326 views

Shortcut for desktop in cmd

Is there any shortcut for desktop in windows command prompt ? (like %WINDIR% for windows directory) I want to use cd %DESKTOP% for example.
0
votes
1answer
493 views

how to call a path from .ini file into bat command string?

I have a .ini file called job1.ini and this .ini contains information which I need to work with by injecting it on a specific spot in my batch script. batch script is in the same folder as my .ini ...
0
votes
0answers
202 views

Open CMD and it immediately crashes

When I open cmd (through Ctrl+R or from system32 folder) in Windows 10, it seems to be running a code (mode 20,5) and after a while, it kills itself. Same problem happens when I try to execute .bat ...
0
votes
2answers
423 views

“cd..” command is not working ? how to fix it?

"cd.." command is not working ? C:\Users\Abhishek Gunjan>cd.. it says 'cd..' is not recognized as an internal or external command, operable program or batch file. how to fix it?
1
vote
1answer
105 views

How to move all video files in all sub-directory to a parent directory?

Best would be using a .bat file. But could also be Powershell if it's easier. Now I'm using this: for /r "M:\movies\new\" %%x in (*.mp4) do move "%%x" "M:\movies\new\" but this works only for one ...
0
votes
0answers
15 views

Server-Client works with School Network, not with Home-Network

I programmed a server client in java which work, but only with the network of my school. So when i have tried to test it with my home network it didn't work. I have already checked the firewall ...
-1
votes
1answer
54 views

How do I hide ONE line of code in the Command Prompt, not the whole window?

Hello and sorry that this is short. I was trying to make an application, using only a batch file. The code I used was: @timeout /t 3 /nobreak I did not want it to show anything, but it showed the ...
0
votes
1answer
119 views

Windows: How do I find all instances of hidden folder and delete?

My backup software when it backups up a file share it injects a bunch of hidden folders with meta data about the files in every single folder and its children. There are hundreds of this folder name ...
0
votes
0answers
186 views

How to stop .bat execution by pressing any key?

I want to know how to stop a .bat by pressing any key. I dont want using Ctrl+C, Is there any .bat command to stop a running loop command by pressing any key?
1
vote
1answer
3k views

What is Connection-specific DNS Suffix

I am reading the output of Windows 10 cmd ipconfig /all. There is one field which I cannot understand and cannot find it on Google which is. I am living in a dorm and I am connected to its network. ...
1
vote
1answer
62 views

“read -s” equavalent for windows?

In Linux you can type and store a value without displaying what you are typing by adding the -s argument to the read command. Is there an equivalent command in Windows?
0
votes
0answers
41 views

Passthrough Password

I am trying to psexec to a remote machine and run a program through a cmd command, however the program prompts for a password (not a windows password). Is there a way to add this password to the ...
1
vote
1answer
58 views

`start .` stopped to work from within FAR manager

I was always using start . command to open current directory in Windows Explorer from within FAR manager. Now it stopped to work and displays application selection window "How do you want to open ...
0
votes
0answers
71 views

ConEmu - Startup on top

I integrated ConEmu to the context menu. So far it works. However, the new console starts up behind the opened explorer window instead of on top (like cmd). Here is the full command from registry: "...
1
vote
1answer
337 views

Is it possible to catch cmd.exe output format (and maybe colors) in Powershell?

If I run ng build -environment=localprod --base-href /Angular5Starter/ in command prompt I receive the following output: However, if I run the same command from Powershell: $ngBuildCommand = "ng ...
0
votes
1answer
226 views

CMD open new winodw when run php command

I am trying to execute some PHP command in my cmd window but when i run command it open new window everytime. I need that command run in same window instead of new window. Someone can please help me ...
0
votes
0answers
27 views

How to restore default cmd behaviour in Windows 10? [duplicate]

In Windows 10, when I used to type cmd in Run. The PowerShell was used to open inside black cmd like window. My friend has somehow made cmd open cmd.exe, which was default in the previous version of ...
0
votes
1answer
463 views

Entering cmd into the file explorer address bar not working

I was trying to open an instance of command prompt by typing 'cmd' on the windows explorer's address bar and pressing Enter but nothing happens. Normally, an instance of the command prompt with the ...
0
votes
1answer
238 views

netsh in command line to change adaptor settings?

I have been playing around with netsh to make some changes to the network adpater on a machine called "Local Area Connection" I would like to change the IP, SUBNET, GATEWAY & DNS IP: 192.168.1.10 ...
0
votes
1answer
93 views

Edit lines below certain

I need to edit the line below a certain line with a certain text I am editing a .txt file using .bat or .vbs in windows 8. Example Account 1 ABC - Debit 900 - Credit 900 ...
1
vote
1answer
41 views

Printer queue quick launch

Can I open printer queue from keyboard? Or maybe programmatically (PS/CMD) so that I can access it from console quickly? I saw this question but placing queue on the desktop seems inelegant solution ...
1
vote
2answers
6k views

windows 10 cmd prompt change directory to drive on different physical harddrive

I am a Windows noob here (coming from a linux background.) I am having a problem in the cmd prompt changing to a directory on a different drive. Either I haven't found any suitable answers for this ...
1
vote
0answers
96 views

How to refresh a folder via command prompt?

I shared a directory via samba in Linux. In Win10 I mounted that directory as a network drive. I edit one script in Linux in that directory and I need to run it in Win10 via command prompt. However, ...
2
votes
0answers
190 views

Registry command for context menu item to copy folder name

I often need to quickly copy the name of a folder in Windows 7, and so am trying to create an equivalent to the Copy as path item that appears in Extended context menus (i.e. when doing Shift+Right ...
0
votes
4answers
1k views

How to easily find files with no extension using Windows

I have some files on my Hard Disk Drive that have no extensions whatsoever. It is very hard to find them manually, I really don't like the fact that I would need to replace my mouse sooner because of ...
0
votes
0answers
71 views

How to make a USB that boots straight into CMD

hello i know how iso files work on USB's and that. but im wondering if there is a ISO file that boots straight into windows CMD without having to press anything (apart from reboot machine)
1
vote
1answer
53 views

Can't connect to a wireless network using cmd

Im trying to connect my phone to my PC via FTP and open the FTP with Windows Explorer using the cmd. Below are the codes: @echo off echo Setup connection to ftp 192.168.43.1 ipconfig | findstr /...