Questions tagged as 'cmd'

5
answers

Is there a sudo for Windows?

Normally it is easy to open a program / script .bat with elevation using the "Run as administrator" option of the right button. But what if I want to run something with elevation from cmd , a kind of sudo , how to?     
asked by 17.06.2014 / 16:52
2
answers

What is the equivalent of the grep command in Windows?

In Linux, when I want to filter by a term when a command will generate a giant list, I use the command grep . For example: ls | grep "termo" However, in Windows there is no command grep . What would be the equivalent of...
asked by 27.06.2017 / 15:07
4
answers

How do I delete a file, which has quotation marks in the name, by CMD?

I'm deleting a folder from my hard drive and I was able to delete everything except this file. Because it has quotation marks, I can not use short names, and I can not erase it the way it is. I've tried fsutil file setshortname , but...
asked by 28.03.2015 / 15:39
4
answers

How to transform the output of a command into a variable in CMD?

Hello, since I started searching on these CMD commands, this question about how to turn the output of a command into a variable has been the one that took the most time. I've seen many codes out there, many quoted that the FOR command cou...
asked by 26.11.2014 / 15:19
2
answers

Use Command Line with C #

In my work I use the Command Line, and wanted to improve the work in my company. To do this, I thought about creating a C # program for people who do not know how to work with the command line. I thought of putting a button to open a CNF fi...
asked by 17.04.2015 / 17:52
1
answer

What are the differences between .bat and .cmd?

We rarely see .cmd , but when we open it, we see that its contents are very close to .bat . What is the reason for this similarity? What would be the main differences between them?
asked by 05.04.2018 / 14:43
1
answer

Send file directly to printer via CMD

Does anyone know how I can send a txt file (with EPL commands) manually to the printer by cmd?     
asked by 08.04.2015 / 15:33
2
answers

Run Windows Prompt commands and save the output to a text file

I have a program that launches a Windows Prompt command. I want to copy the output of this command and save it to a text file. Example: The command is ipconfig and I want the output to be copied to a file.     
asked by 08.06.2015 / 10:50
1
answer

How to hide command output in CMD?

I have a file .bat and there is the command: chcp 65001 That results in CMD output: Página de código ativa: 65001 But I want this message, displayed after the command is executed, to be hidden to the user. What is the CMD comman...
asked by 24.08.2016 / 01:27
2
answers

Show Processor Usage

I'm trying to show the use of the server's processor with PHP. Server is Windows with IIS. I've already tried using: exec("wmic /node:localhost path Win32_Processor where DeviceID='CPU0' get LoadPercentage", $out); exec("wmic cpu get loadperc...
asked by 06.09.2016 / 15:32