Most voted "cmd" questions
Command Prompt (cmd.exe executable name) is the command line interpreter provided by Microsoft on OS/2, Windows CE, and Windows NT operating systems (including Windows 2000, XP, Vista, 7, Server 2003, and Server 2008).
Learn more…266 questions
Sort by count of
-
2
votes1
answer455
viewsReturn Result of an IF executed by Command Prompt(CMD) in C#
Hello, I’m trying to get a return from an IF line from Command Prompt (CMD) with Visual Studio 2015 in C#, but I’m not getting it. The following Code, runs the CMD, inserts the directory path that…
-
2
votes2
answers585
viewsDelete file with name and path in other file. bat
I need to develop a batch that has to read the data in a.txt file, and according to the path and name of the file I have in txt a batch has to go to the folder and delete files. The data I have in…
-
2
votes1
answer15108
viewsHow to declare a variable in . BAT ("shell")?
I’m starting to mess with file. BAT, and I created a command line. Example: ping <nome do computador> Below it would show me if it is online, would look like this: ping computador_1 But I…
-
2
votes3
answers115
viewsInvalid parameter in batch script
I created the following batch script to prevent the user from deleting some directories within their home directory. We use Onedrive for Business and some symbolic links for the user to…
-
2
votes1
answer291
viewsFfmpeg and BAT Automatic Conversion
I am using ffmpeg to convert all videos from one folder to . mp4, and for that I have created one . bat to make the process, but, the problem that is next: When it starts the conversion, it creates…
-
2
votes2
answers1693
viewsHow to remove accent using bat/cmd
How to create folder using a user name without special accent(s) or character(s)? Like, for example, changing càmbio for cambio Is there a command that converts this? Thanks!…
-
2
votes3
answers2034
viewsHandle cmd files using python
Hello! I need to create an application in python to decrease the labor where I work, we use files . bat to execute several commands in cmd, but some of these commands manipulate IP’s and as it comes…
-
2
votes1
answer599
viewsPrinting via cmd
I have a label printer of the brand O Eal, this printer is connected in my network. I am accessing a remote connection from a server within my network. Inside the server I used the command net use…
cmdasked 5 years, 3 months ago user159423 -
2
votes2
answers2019
viewsAutomatic download by bat - View file date before download
I want to create a script at windows prompt to update the system automatically. But I only want to download if you have new update. Could anyone tell me how I could check the file date (.rar) before…
-
2
votes1
answer202
viewsFilter cmd output with VBS and return value
I have in my environment Arcserve Backup, which is the tape backup program we use, in it we have a program called ca_qmgr that manages the queues of backup Tvs, with a parameter via CMD so that it…
-
2
votes2
answers130
viewsSet variable with highest existing number in file
I have a file named "list.txt" with the content below: 1 10 1000 333 46 4611116 498 I need to create another file, called "Lista2.txt" ordered from the largest to the smallest using a batch file. I…
-
2
votes1
answer724
viewsReplace space with new powershell line
How is it possible to run a file . bat that runs powershell to replace spaces with a new line? I currently have this scenario in the file run.bat: set id=1 powershell "(gc %id%_01.txt) -replace…
-
2
votes1
answer883
viewsI wonder how I get the result of a command in python that runs in CMD and save in a variable,
That program drips a IP, would like to pick up the result of that ping that is done on this line os.system ('ping -n 4 {} '.format(ip)) that opens the CMD and drips the IP, and save to any variable,…
-
2
votes2
answers120
viewscmd closing when using the cls/clear command
I made a function that identifies if the person is using windows or linux, and with that runs the right command to clean cmd/terminal, worked on the visual studio code console, however when I will…
-
2
votes1
answer74
viewsWritten to command line via Lua, command line reading via C#
I was in need of some help with a code on moon, to generate parameters for the command line, and then collect them by another application, only in C#, to be more specific, I want to run a virtual…
-
1
votes2
answers170
viewsHow to run all files inside a Folder
I have a folder with several audio files, and I want the cmd code to run, one at a time. Does anyone have any idea if this is possible and if so, how?
-
1
votes3
answers1106
viewsDoubts with conditional commands in Batch files
The Intent is to copy files .jpg to a subfolder called \image, and the others, I mean, different files from .jpg, to the folder \New folder (2)\. Only it’s not working, which could be wrong? Below…
-
1
votes1
answer186
viewsError in SQL 2008 Express installation (Silent Mode)
The installation parameters are as follows, but when trying to do it gives error and the installation is aborted. C:\Setup.exe /QS /ACTION="Install" /FEATURES="SQL" /INSTANCENAME="SQLEXPRESS"…
-
1
votes2
answers385
viewsHow to make cmd slower
Is there any command for the cmd run a program I have run from the compiler? I would like to debug what I did and, as I often fall into infinite loop, I want to know if you have how to do the cmd…
-
1
votes1
answer91
viewsBatch Move and Del commands are not working
@echo OFF mkdir saida sort %1 > cadperfiSorted 2>> saida\error.txt start MAKEOPEACER5.jar cadperfiSorted del cadperfiSorted //OPEACER5 é um arquivo gerado pelo .jar move OPEACER5 saida This…
-
1
votes1
answer309
viewsClass not found in Windows CMD build
I am unable to run my JAVA algorithms through the Windows 8.1 terminal . It turns out that there is always a class error not found, I already put the . class files together with . java and still…
-
1
votes1
answer87
viewsHow can I find the user on Ubuntu (Shell/Bash)
I want to create a system that should interactively find the user and then say whether it exists or not. I must provide the username and if the user is found then the system has found the username…
-
1
votes1
answer839
viewsHow to set a time to automatically shut down your computer with a Batch file
I am following a tutorial from the site Super User of the network of Stack Exchange sites, with the idea of programming my computer to shut down by passing X time, after we have run or double click…
-
1
votes1
answer686
viewsBatch to locate a subfolder, move all files to a level above and delete the folder
I have this structure: .. ..\FolderA\FolderX\File1.txt ..\FolderB\FolderX\File2.txt ..\FolderC\FolderD\FolderE\FolderX\File3.txt I need a batch to locate all "Folderx" folders in the subdirectories…
-
1
votes1
answer675
viewsCopy files in c
In C language, how do I copy the file gg.bat for "%AppData%\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" I tried with system("copy \"gg.bat\" \"%%appdata%%\\microsoft\\windows\\start…
-
1
votes1
answer3202
viewsProblems with accentuation - Python
Hi, I’m having stress problems in Python. In the code I put this: # -- coding: UTF-8 -- But the accents are not recognized in the cmd. Follow print for better understanding. From now on, thank you!…
-
1
votes2
answers1583
viewsHow to close a. bat file with another . bat file
I have a.bat file running this code: cd C:\Users\PC\Desktop\nginx-1.10.2\php php-cgi -b 127.0.0.1:9000 But it needs to be open while it’s being used. Is there any way to create another . bat to…
-
1
votes2
answers2019
viewsInvalid character in file . bat
Sirs ! I have a . bat file that I use to start Apache Tomcat from my application in debug mode. But while running this file on CMD, the first thing displayed is the following message: '' is not…
-
1
votes0
answers91
viewsRestore routes after route -F command?
Hello, good night/dawn! I’m researching here about the route-f command, which to me was unknown. This afternoon my curious brother was fiddling with the cmd, trying to understand the commands…
-
1
votes2
answers4035
viewsGenerate Postgresql Server backup with password via command line
I need to perform an automatic Backup of a Postgresql server, I have a command that makes this backup but it always asks me the password and I could not find a command where I can already determine…
-
1
votes2
answers632
viewsAssign directory of a searched file to a CMD variable
In batch I can search a file with the following command: C:\>DIR /S /B PROGRAMA.EXE And if the file is found it will return like this: C: Users Dev Desktop Program.exe I would like to be able to…
-
1
votes2
answers764
viewsuse variable cmd command with python
I wanted to make a program that opens and reads a text file. Then run or command on cmd using what he had read in the text file more or less like this: import os nome = open ('nome.txt') nome1…
-
1
votes1
answer10500
viewsCreate script to run program by passing only part of the name
I created a small script (.bat) for the installation of several programs silently. Over time the programs keep updating requiring me to edit the code to put the version number of the program. Doubt:…
-
1
votes1
answer1285
viewsAdd suffix to first line text file using BAT
Good staff! I’m editing some F1C game mods, which uses text files to store pilots' AI data. In the first line of each file come the name of the pilot: Michael Schumacher ... and I’d like to add a…
-
1
votes1
answer11399
viewsHow to remove a directory in Windows even if it is in use?
I have a database service running in a known directory C:\meuBanco\exe\ and now I have developed an updater of this service, which performs the following steps: For service Excludes the folder exe:…
-
1
votes1
answer228
viewsCheck mapped network unit size
I’m developing an app, and I need to check the free space on the mapped network drive, I can grab the contents of a file in my application directory, so I created a script to execute the command to…
-
1
votes0
answers711
viewsexecute CMD command through JAVA
I am having trouble executing a command in CMD through JAVA. This command is executed by a . jar that lies inside a directory "C: Copyutility Copyutility.jar. So I need to enter this directory and…
-
1
votes1
answer4621
viewsHow to create a . bat to run network file
bat that is locally on a network of multiple computers, one has a record label and the others do not, the one that does not have the record company I use one . bat with the following code via local…
-
1
votes1
answer354
viewsHow to save java -version return to cmd
I have a problem saving to . txt the return of the command "java -version" executed in cmd. I am running as follows: java -version >> "%temp%/resultado.txt" It creates the file but does not…
-
1
votes1
answer3590
viewsPing by cmd in bat file
Whoa, does anyone know why this is happening? when I test p ping by cmd it works, but when I test for a.bat file it keeps consulting endlessly and hangs... someone can help me…
-
1
votes1
answer2925
viewsCalling more than one script bat
I have a very boring situation and I could not find a solution, I have 2 scripts and the same are called through another, my problem is that it calls one and not the other, one starts one tomcat and…
-
1
votes2
answers1283
viewsDelete contents including folders
I am trying to delete the contents of a folder but I have the following problem: Using the command del it erases only files and folders get (you have to delete the folders too). Using the command rd…
-
1
votes1
answer2246
viewsIs there a way to change a default program by java, cmd or regedit?
I am developing a java system, but from it I should change the default program to open . pdf in the switch. In Windows 10 it opens by default in Edge, but from the system it should change to Adobe.…
-
1
votes0
answers260
viewsRun the webservice via CMD returns NULL
I have the code below that I need to run every hour. This script running by the browser returns the data correctly. Intended to run it via scheduled tasks, by CMD through execution lines:…
-
1
votes1
answer177
viewsHow to create a. bat file that Ionic serves?
Good evening, I’m trying to create a file . bat to run Ionic serves, however I’m not getting good results and I need help! Follow what I’ve done: cd C: Users ernetwork Desktop ERN_ADM instation site…
-
1
votes3
answers861
viewsSimulate "ok" via command line
I have a Windows prompt command that disables proxy settings: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" /v ProxyEnable /t REG_DWORD /d 0 /f My system browsers are…
-
1
votes1
answer180
viewsRuns php script in cmd with Curl
I am testing an api, while trying to use some features presented the following message: Something Went Wrong: Network: CURL error 60: SSL Certificate problem: Unable to get local Issuer Certificate…
-
1
votes1
answer783
viewsExit a c program via CMD
In the following code, when I press 9 the program must close: case 9: exit(0); After pressing 9 the screen below in cmd is displayed, but after pressing 9 is displayed the message: Press to close…
-
1
votes1
answer8796
viewsHow to create "drawings" in Batch written files
My question is this:: How do I add "drawings" to my code . bat like the ones that appear on the Linux terminal? I tried to insert the "drawing" using the Figlet Generator tool. But when I run the…
-
1
votes1
answer558
viewsClear only one row of a batch file
My question is whether there is any way to delete only one line of several. For example: the command prints three numbers on the screen of the prompt: echo 1 echo 2 echo 3 And then, he just erases…