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

Questions tagged [cmd.exe]

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

0
votes
0answers
19 views

How to copy entire folder, not just the contents in CMD

I have a folder called "Files Commands" with three subfolders "DEL" "MORE" "RN", the three subfolders each contain one text file. How do I copy the entire "RN" folder together with its content to ...
0
votes
2answers
50 views

cmd/bat “switch”. does not change the variable in ELSE

I am trying to make a parameter switch in the menu, but it does not change in the opposite direction. It seems everything is elementary, but does not work. set x=900 :1 cls & echo %x% choice /c ...
0
votes
1answer
24 views

Autocomplete host names in Windows CMD

WSL Bash thing does it, for example, when using ping : But CMD can not do it. Is there a way to achieve that? Note: I know about clink, but it does not provide hosts file auto-completion, which is ...
16
votes
1answer
28k views

Change working directory to network share

I can list all files in a folder with: dir \\aenw08v401\FOLDER\I001\* However, when I execute cd \\aenw08v401\FOLDER\I001, the current working directory won't change at all. This is what I see when ...
8
votes
1answer
8k views

Windows 10 Powershell tree command, how to show files

How do I list folders and files using the PowerShell tree command? Is it possible to color format the output for distinct files and folders?
0
votes
0answers
538 views

CHKDSK quits without doing anything on exFAT volume

I have a 1Tb external HD formatted in exFAT for cross os use. The drive was disconnected during use and is now 'dirty'. I can access the files but not write. I tried running chkdsk to scan for ...
1
vote
3answers
6k views

kill all processes with taskkill by username but exclude some processes

I want to kill all processes with taskkill by username, with this command: taskkill /f /fi "USERNAME eq %username%" The problem is that I want to exclude (skip) some processes (not kill them all), ...
0
votes
0answers
9 views

pip install pyaudio error code 1

hello so when I run. pip install pyaudio --allow-external pyaudio --allow-unverified pyaudio I get this back and would rly like some help rn. Command "c:\users\ramyar.mohamed\appdata\local\programs\...
4
votes
2answers
20k views

How can I make the computer beep from a script/program called by the Windows task scheduler?

I am using Windows 7 home edition. I want to make my computer wait a certain amount of time, then beep in warning right before it terminates a program. As a test, I wrote the following batch file to ...
0
votes
1answer
17 views

How do i make a folder like C:/“folder name” go to D:/“folder name” without changing the location. (Linking)

I had a folder at C:\Steam\steamapps\common\ that was located on to D:\Steam\steamapps\common. So steam would download files in the C drive but the games would get installed on D. I fixed this ...
1
vote
0answers
18 views

tasklist.exe gives incorrect errors

Running tasklist.exe to check the running processes on a remote system. I sometimes get spurious errors (listed below). Command: tasklist.exe /nh /s \\RemotePcName /fi "memusage gt 200000" ERROR: ...
1
vote
1answer
31 views

How can I share only my CMD Prompt window remotely to other computers?

I have recently been setting a server and when I start it with its files in the folder with a .bat file it opens up terminal with a command line for it. It is very similar interface to what a regular ...
3
votes
1answer
12k views

Set focus onto a specific window using VBScript

Is there a way to set the focus onto a specific window using VBScript ? Window name should be settable by something. (Not an additional program such as AutoIT or so) (Windows 7 Pro)
2
votes
1answer
3k views

How to extract part of a string between 2 delimiters, in Windows batch file?

I have a variable length string starting with START and ending with END as delimiters. I want to extract the string between START and END. I tried doing SET _result=%String:~6,-4% ECHO %_result% ...
1
vote
0answers
23 views

Why Windows 7 display an error message when I double click on file named as INIT.BCP.BAT

I have created a BAT script file named INIT.BCP.BAT on my desktop that contains (to be simple) only following lines echo Hello pause When I doubleclick on it, Windows 7 displays following message. ...
0
votes
0answers
19 views

Check windows remote desktop availability from command line

How can I check from command line whether a server accepts RDP (windows remote desktop) connections? without using user/password login credentials I am trying to run automated network sanity checks....
6
votes
3answers
3k views

100% reliable directory copy on Windows systems (NTFS)

Is there a directory copying method for NTFS that can copy a directory 100% accurately, every time, with every single file, sub-directory, permission, attribute, and symbolic link / junction intact ...
0
votes
1answer
24 views

Windows execute winword from it's path

If I type winword (winword.exe and probably other variations work too) in the cmd anywhere on windows, it opens Word (default Office application). But if I am on the actual folder that contains ...
0
votes
0answers
17 views

How to detect that `python.exe` has crashed when started from `cmd`?

I'm running python tests using this cmd command on windows 7: D:\bin\python.exe -m pytest --junit-xml=results.xml C:\Users\my_username\.jenkins\workspace\FirstPipelineForOrigin\test\project_test I ...
14
votes
1answer
1k views

What does ^& represent in Windows command line?

I've noticed the usage of ^& in: (robocopy c:\dirA c:\dirB *.*) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0 I am wondering what does it do?
-3
votes
3answers
208 views

Why wont CMD work

I am using CMD but when ever I want to go to a specific location the response I get is not recognized as an internal or external command operable program or batch file. This happens no matter what ...
0
votes
1answer
10 views

Can't close a program via .BAT after printing PDF document

I need to print copies of PDF document with a delay before printing each copy. I created a new task in the Windows' Task Scheduler and in the Actions tab of the Scheduler I selected my BAT file with ...
0
votes
2answers
2k views

wmic product get does not get all programs

When I use wmic product get name name,version I get a list where are showed all programs installed on my PC, but still there are not all programs listed. When I go to control panel > Uninstall ...
1
vote
1answer
4k views

cmd.exe error windows 7 the application was unable to start correctly (0xc0000142). Click ok to close the application

when i try to open the cmd.exe. a box pops up with the message of cmd.exe error windows 7 the application was unable to start correctly (0xc0000142). Click ok to close the application. my pc was ...
0
votes
1answer
62 views

copy files only when they do not exist at destination

I want to copy many files in many folders form one hard disk A to another harddisk B. How can I copy only files from A to B and skip the copy if the files already exist at B? Is this possible with ...
2
votes
2answers
5k views

taskkill: The process not found

This happens from time to time: I run a simple taskkill command (as administrator) like this: taskkill /im sidebar.exe /f But get the following: ERROR: The process "sidebar.exe" not found. Also ...
0
votes
0answers
39 views

Recursively move deepest folder to top level(windows)

Friends computer had a virus which moved his external hard drive content into a folder structure approx 2000 levels deep. How I do recursively move folder from the deepest level to the top level
1
vote
1answer
21 views

CMD Find a filename in directory with patter as ABC-[*].zip

How do I find all the files in the directory starting with ABC and ending with .zip in CMD?
0
votes
1answer
568 views

How to restore Windows 10 GPT boot config using command line?

Long story short, windows 10 GPT drive can't boot, and can't access drive in question from command line, only X:\ . I have the option to repair/rebuild MBR using live ISO but its a GPT drive, is this ...
2
votes
2answers
137 views

What is the difference between Total Physical memory and RAM ?

I believed both terminologies represent same thing however I see different values and makes me wonder is Total Physical Memory = RAM + something ? Total Physical Memory output using- "wmic ...
0
votes
0answers
11 views

PsExec launched batch file from host windows 7 to guest Windows 7 to copy shared folder path not recognized

I use Virtualbox with host Windows 7 and guest WIndows 7. I created a batch file to move a folder (with files and subfolder inside) from E: shared folder of Virtualbox to D: (My Hard Drive) This ...
1
vote
2answers
28 views

Is there any way to create bash like aliases in windows (powershell or cmd)?

I want to create an alias that can still take input, like: alias ytx='youtube-dl -ciw -f bestaudio --yes-playlist Is this possible within windows? I tried bash aliases equivalent for powershell? ...
0
votes
0answers
22 views

Login analysis service (ssas) using command prompt

I want to login SQL Management Studio (ssms.exe) using command prompt, but want to connect to analysis service server. I tried ssms.exe -S servername -U username -P password in cmd, which connected ...
0
votes
1answer
82 views

Enable-WindowsOptionalFeature is not recognized in Windows 10

When I try to run Enable-WindowsOptionalFeature windows throws ''Enable-WindowsOptionalFeature' is not recognized as an internal or external command, operable program or batch file.' I am running ...
1
vote
1answer
5k views

Refresh windows services through cmd

I am trying to refresh the state of a specific service on windows server 2003. I tried using refresh <service instance> but if I run this I get this error: 'refresh' is not recognized as an ...
-2
votes
1answer
63 views

CMD command to download a file

I'm looking for a cmd only command that will allow me to download a file. No bitsadmin, no powershell, no .vbs scripts. My own research has lead me nowhere, there only seems to be things about ...
1
vote
1answer
4k views

Unable to right click on the cmd windows prompt

I am unable to right click on the cmd windows prompt in order to paste something there. How can I fix this problem? Thanks
0
votes
1answer
69 views

How to Write a CMD Script to Mount and Use ISO File

I have an ISO file name lfs-ms.iso located at the following directory: F:\MS\lfs-ms.iso This ISO file contains an executable called lfs-inst.exe. I use this file many a times so I have to mount the ...
1
vote
2answers
16k views

How can I change screen resolution from command prompt in Windows 10?

I need to change my screen's resolution from the command prompt, I've tried QRes and NirCmd and both weren't able to change the screen resolution (i've already checked the syntax). Is there any way to ...
0
votes
1answer
36 views

dir / ls not displaying files outside of root directory in Windows 10

I've been trying to point to files and directories via my command line or powershell in windows, but for whatever reason the dir or ls command will not display files or folders within the directory ...
1
vote
2answers
10k views

Windows 10 Command Prompt system cannot find the file specified

Environment Windows 10 1511 Stable Release UAC Disabled I have a C: and an M: mounted from another Windows Machine Issue I can view, edit & delete contents of M: without any issues when using ...
-1
votes
0answers
27 views

How to enter WSL automatically whenever cmd.exe is lauched?

Is it possible to let cmd.exe run wsl whenever it is lauched? I am asking this because I use a program (Stata) that can run shell script by opening cmd.exe. But, all the shell scripts are written for ...
2
votes
1answer
90 views

Is there an autoexit for cmd.exe like there is an autorun?

In windows when you create a value autorun in registry key HKEY_CURRENT_USER\Software\Microsoft\Command Processor and set it to, say, echo Hello from autorun, invoking cmd.exe will, on invocation, ...
2
votes
1answer
5k views

How to change a process name in the task manager via batch

How can I start a program via batch and change it´s name in the Task Manger. For example, start "program" /HIGH "%~dp0\program.bin" In the Task Manager it shows program.bin, but can I change it to ...
0
votes
1answer
35 views

Ntfs partition is broken and needs repairs. Why does the troubleshot in Winre/Winpe menu is disabled as consequence of that?

Well looks Windows live always look at all disk because even from the install dvd I am landing on this screen Not only text does not appear but this menu is disabled for an unknow reason. Which ...
1
vote
2answers
38 views

copy a single file to many folders which contain as condition another single file

I have many folders on my hard disk which contain the file "output.txt". Now I want to copy in each of this folders the same single file "info.txt". How can I do that with the command shell of ...
2
votes
2answers
1k views

get process name from it's own description?

How can I get the process name from computer memory by using loop depending on the process description ? Example: My program name is "dev.exe" in memory and its description is "a tool for helping ...
0
votes
1answer
35 views

How to keep original name after running command line tool?

I am running imagemagick (CLI tool) to splice an image into 16 equal parts. I am using it like so : convert inputfile.jpg -crop 4x4@ +repage +adjoin -resize 256x256 output_4x4_%03d.jpg I'd like to ...
1
vote
2answers
2k views

Command for “cmd” to update all the software in windows?

In Ubuntu sudo apt-get update update all the packages. Like Ubuntu, does Windows is also having any command for cmd to update all the software present in Windows?
0
votes
0answers
18 views

CMD closes immediately after opening it

My problem I am trying to open a command prompt like this: Step 1 press windows+run Step 2 Write cmd Step 3 Press enter Result Cmd briefly opens then closes Causes Recently i had a ...