Questions tagged [cmd.exe]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

CMD/Powershell looking for "curl" executable in the wrong location despite PATH

I have a strange issue with both CMD and Powershell on Windows 10 that has been giving me some trouble. An unrelated scriptwas failing when running curl, and after some investigation it looks like a ...
1 vote
1 answer
26 views

How do I show parts of a string?

@echo off set keys=_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 SetLocal EnableDelayedExpansion from keys above, command echo !keys:~1,1! output A, command echo !keys:~4,1! output D. my question: How do I ...
4 votes
2 answers
9k 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 ...
-1 votes
3 answers
42 views

How do I delete files with "- copy" in the name using wildcards?

I have a problem, which appears that How to delete files with specified text in their names? would delete what I don't want deleted. Because of an issue with OneDrive after installing an extra ...
0 votes
1 answer
5k views

access 192.168.0.1 with CMD

I need some help to create a .bat file which need to: 1) Access 192.168.0.1 or tplinklogin.net (my wi-fi router address) 2) Type/insert user and password 3) Click/run "Disconnect" wait 1-3 sec 4) ...
1 vote
4 answers
11k views

How do you re-source the environment variables in a command prompt in Windows?

In a bash shell, you can edit your environment variables, run source ./.bashrc and refresh the values of environment variables in an already open shell. Does Windows have a similar command that you ...
0 votes
2 answers
20 views

How can I echo the actual logged in user if running batch as administrator?

I would like to know which user is logged in to Windows from the bat script I launch with right click and "Run as Administrator". If I try echo %username% the script obviously output "...
-1 votes
2 answers
65 views

Add confirmation after executing ROBOCOPY command

I have started to use ROBOCOPY command a lot. I use ROBOCOPY source destination /MIR. Is there any way to add confirmation, "y/n" after the command is executed, but not actually ran. So I ...
5 votes
2 answers
26k views

How to get the directory path where a Batch file is called from?

If you put a test.bat file in your desktop of your Windows 10 machine, then you can call it by simply writing test in the address bar of Windows directory explorer. This behavior is used by cmd ...
0 votes
1 answer
18 views

cmd.exe ignoring /t color when using /c instead of /k

Let's say I have a simple .bat file called foo.bat containing just @echo off :dostuff echo bar timeout /t 2 /nobreak goto :dostuff If I run it from prompt Microsoft Windows [Version 10.0.22621.3155] ...
2 votes
2 answers
26k views

List all the serial ports (available and busy) on any of windows terminals

The cmd's mode command shows all the available (to be opened) serial ports, omitting the ones which are occupied by other programs. The PowerShell's command: [System.IO.Ports.SerialPort]::getportnames(...
1 vote
1 answer
5k views

System error 5 has occurred even as admin - (cmd) Windows 10

My system is Windows 10 Pro x64, with the latest updates applied. When I try to execute any "net" command in cmd (eg: net stop TeamViewer, net users, etc') I get the error "System error 5 has ...
1 vote
2 answers
6k views

How to I export filenames, filepath and properties of a directory tree to CSV?

I have a hard drive full of backups that I need to detail on a spreadsheet quickly and in the following specific way. I'm hoping there's an easy way to do what i need via some sort of .bat or .cmd ...
0 votes
1 answer
9k views

Could not start zookeeper for kafka on windows

I have the following folder structure: from C:\Program Files\kafka\kafka_2.11-0.11.0.0 frolder I try to execute following command: bin\windows\zookeeper-server-start.bat config\zookeeper.properties ...
5 votes
4 answers
4k views

cmd Copy command to multiple folders

I want to copy a file from one folder to another folder which has many sub-folders. Using command line. How can I copy this file to all sub-folders. Eg. I have a file called Test.txt. I want to copy ...
0 votes
0 answers
47 views

Passing `Set /p _var=/irc:` when used by findstr, the colon does not get processed the same as if I typed `findstr /irc:` Example provided

I have search through the undocumented 'findstr' thread, SS64 findstr-escapes as well as SS64, Escape Characters for how to include the colon in the following way; no luck with either. Example batch ...
2 votes
3 answers
4k views

Batch file error because of space in input string

I'm trying to make a table of possible inputs for the end user, but one of the inputs is causing the program to crash as there is a space. I know that usually enclosing the input with " " is the ...
0 votes
1 answer
36 views

Windows pipe curl output to cmd

can anyone help me out here: curl -sSL https://pastebin.com/raw/CHCq9VQt | bash I know this command will retrieve the raw text from pastebin(just python --version) and run that in bash(linux) I need ...
44 votes
3 answers
136k views

How do you convert an SSH private key to a .ppk on the Windows command line?

I have generated a key pair with ssh-keygen. I now want to use the same key pair with PuTTY-based applications. Because I'm working in a CLI environment, I want to convert the key to the .ppk format ...
20 votes
3 answers
88k views

How, from a cmd, start a new cmd instance and run a command within?

I need to run two commands which never terminate. What I normally do is to start a cmd terminal and type in the first command start another cmd terminal and type in the second command I then have ...
-1 votes
0 answers
39 views

How to see all IP Addresses in the same LAN as mine? [duplicate]

I need to see the IP addresses of PCs in same LAN as mine (work LAN) to connect to my colleague's PC with SSH. I'd like to use PowerShell or Command Prompt.
0 votes
1 answer
41 views

Create a archive split into blocks of a maximum size using Windows shell

As example. I want to compress a directory of 100GB split into 10 archives of 10GB using cmd or powershell, non-interactive without installing additional tools. Using tar would be awesome but ...
1 vote
2 answers
4k views

how to view hidden files on an NTFS drive that were copied from a Mac?

I have some files on my external NTFS drive that were copied from a Mac using Paragon NTFS. Back in Windows 7, I'm unable to view said files. I believe they exist because they still occupy space on ...
0 votes
1 answer
4k views

Net user command isn't working windows 7

My primary partition is D:\ I changed directory into D:\Users Then I did Net user /add useruser password "The user or group account specified can not be found" And right underneath that says "...
2 votes
3 answers
7k views

How can I create a file to fill up the disk via cmd?

I want to fill up the disk for a test which requires the disk storage to be full. For this, I found that I could use the command line with the following command: fsutil file createnew <filename> ...
0 votes
1 answer
4k views

Trying to Remove all printers tied to an old print server

Recently my hospital shut down our old 2008RT print server. We sent out documentation for users to set up to the new printers by simply navigating to the print server. for the most part people are ...
-1 votes
1 answer
61 views

Uninstall SourceTree using cmd or powershell

I would like to use cmd or powershell commands to uninstall SourceTree from windows 10 machines on my network. The reason I need a terminal way is that I have to do this remotely and simultaneously ...
3 votes
2 answers
10k views

How can I make a batch script open a command-line window in it's current location?

I'm working with a program that requires me to open a command-line window in the directory containing the some files. The issue I face is that Windows has since removed the option from the context ...
2 votes
2 answers
2k views

ipconfig from the CMD opens and closes another CMD

I tried running ipconfig from CMD, both elevated and not, but instead of displaying it's output inline, it opens another CMD and closes it immediately after the output is listed. I've tried running ...
2 votes
3 answers
6k views

How do I pass multiple commands to START in Windows Command Line?

How do I pass multiple commands to start? I tried start "window title" echo 1 && echo 2 But, predictably, start only gets "echo 1" and thus "1" is echoed in the ...
1 vote
1 answer
7k views

How to fix "Assertion failed: new_time >= loop->time, file c:\ws\deps\uv\src\win\core.c, line 309" error?

I have a HP laptop with Windows 10 and when I use node.js (v 12.14.0) I get this error: "Assertion failed: new_time >= loop->time, file c:\ws\deps\uv\src\win\core.c, line 309". I read from ...
0 votes
1 answer
4k views

File Explorer Crash When Copy/Move Files Windows 11

First of all, I already knew the issue, and already "googling" & did multiple possible solutions to fix File Explorer Crash When Copy/Move Files. But unfortunately, the issue still not ...
1 vote
2 answers
179 views

How do I "mv */* ./" in a Windows command shell?

On a Windows machine, I've got about 50 subdirectories in the same directory, each with around 5 files in it. I want to get all 250-or-so files into one directory. In a UNIX system, I'd just open a ...
4 votes
5 answers
24k views

How can I parse a .LNK shortcut from the Command Prompt in Windows?

I have a shortcut to a folder and I want to open it from the Command Prompt. I want the Command Prompt to immediately change to the target location of the shortcut. Instead, if I try to execute the ...
0 votes
1 answer
40 views

Trying to run some apps from cmd doesn't start them properly

Noob here. I was playing around with ssh and was trying to run some commands (start some apps) on my ssh server (win10). Running anydesk.exe for example, actually opens the program and I can connect. ...
2 votes
2 answers
8k 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
1 answer
4k views

Robocopy will not copy files involving any external drives

I am attempting to back up data onto some external hard drives as a part of my job, the data sets can be over 100GB in size with specific file structure so using robocopy is a must. When I run this ...
2 votes
2 answers
19k views

How to get the first line from cmd command output?

I need to get only first line from Windows cmd command. Example of command: dir /b /o-d cert*.pem it returns: cert1.pem cert2.pem cert3.pem How to get only first line to return cert1.pem? ...
0 votes
2 answers
1k views

Setting codepage 1252 in Windows 11 still gets cp 850 in terminals

On a Windows 11 device, I have the international settings (running "intl.cpl") set to Italian, for non-Unicode applications. Now, that results in applications like WinMerge guessing codepage ...
0 votes
1 answer
742 views

Why does running TASKKILL result in this error: “Taskkill: ERROR: Invalid namespace.”

When I try to use TASKKILL. TASKKILL /IM notepad.exe I get this error. ERROR: Invalid namespace Even the tasklist is not working. TASKLIST I also get that error message. How can i fix this problem??...
1 vote
2 answers
104 views

Passing a variable to a variable within a batch file

I'm grabbing a value from the registry assigning it to %%b and trying to pass %%b to another area within the batch file as shown below. But it comes out as %b. It does not pass the variable a second ...
1 vote
1 answer
787 views

Shutdown command prompt strange behavior

Recently I've found something strange behavior of shutdown command prompt. When I type shutdown -h, it'll shutdown not hibernate. When I type only shutdown, it'll shutdown not a list of options of ...
0 votes
1 answer
798 views

What is wrong with this "move" command?

I am trying to use command in Windows 10 as administrator to move 27,000 HTML files from one directory to another. When I use the command it reports that there is a syntax error. So what is wrong with ...
0 votes
2 answers
7k views

A blank C:\WINDOWS\system32\cmd.exe keeps popping up.. R for windows Front-End

I'm using Windows 10 Pro. Every 20 - 30 seconds I notice a cmd.exe window that pops up briefly, takes focus away from my cursor and then disappears. This starts to happen shortly after I log in and ...
0 votes
3 answers
4k views

CMD Line executable of PUTTY calling a script

I have been trying to automate a telnet process using a script of sorts. Whenever I get a hint, it points to PUTTY. I have downloaded PUTTY and the derivatives thereof, (plink.exe) to get my script ...
2 votes
1 answer
3k views

ssh <username>@<localhost> failed on cmd

When I do ssh -vvv receive:finish_connect - ERROR: async io completed with error: 10061, io:000002CDE9E3A8E0 connect to address localhost port 22: Connection refused Can anyone tell me how to solve ...
20 votes
1 answer
65k views

How to add installed program to command prompt in windows?

I have a problem with adding already installed program as available command in windows cmd. For example I installed new text Geany and want to open text file using this command: geany myfile.txt I ...
1 vote
1 answer
8k views

How do I redirect output from python to file

I want to redirect all output (stdout and stderr) of console to the text file. I make the following steps: Open cmd.exe Start command: "python.exe" > "file.txt" After that, I'm waiting for the ...
0 votes
2 answers
2k 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 ...
26 votes
1 answer
20k views

How to wipe unallocated disk space in Windows

Due to the nature of how filesystems like NTFS work, files that are deleted "permanently" from within Windows aren't immediately deleted - they're simply marked as deleted from the Master File Table (...

1
2 3 4 5
61