Most voted "batch" questions
"Batch", also called "batch processing", refers to the(s) execution(s) of one or more commands, which may be internal, and/or external. As, also, can(m) contain (in) program(s) call(s), on a computer, for various executions, with or without user interaction, to meet the desired processing.
Learn more…222 questions
Sort by count of
-
28
votes5
answers26646
viewsIs there a "sudo" for Windows?
Usually it is easy to open a program/script .bat with upgrade using the option "Run as Administrator" right-click. But what if I want to run something with elevation from the cmd, a kind of sudo,…
-
13
votes4
answers3721
viewsList files by name (containing date), but filter the 5 days prior to the current date with . bat?
I’m trying to do something that maybe it’s not even possible to do in bat but specific using findstr? I have a dozen files in that layout: filename So, date as day and month content two digits and…
-
10
votes4
answers23430
viewsHow to treat accentuation in. bat files?
good morning! I’m having a hard time copying a file from one folder to another via the copy command. I’m using the Encoding UTF-8, but the cmd can’t handle the accentuation for the line below: copy…
-
9
votes3
answers2597
viewsHow to write commands in a console program through a batch (.bat) file?
I want to automate a routine through a .bat which will call a console program which, in turn, will receive successive commands from this .bat. This console program could be, for example, an ftp…
-
9
votes4
answers2076
viewsHow to check if IP exists with bat
I can drip all the network addresses with something similar to this: for /l %%x in (1, 1, 100) do ping 10.1.1.%%x However, not all addresses are valid, and in that case, he of the timeout. Is there…
batchasked 7 years, 6 months ago Artur Trapp 5,175 -
8
votes3
answers2208
viewsCreate database on server via mysql-Workbench (.mwb) template via command line
I am trying to assemble a bat to create the database in the mysql server from an EER (.mwb) mysql-Workbench model, that is, in the command line, is it possible to perform this process? Someone could…
mysql relational-model batch mysql-workbench command-lineasked 9 years, 5 months ago Artur_Indio 1,093 -
8
votes2
answers439
viewsSettings . bat running a . dstx
I am running a file . dtsx using a load bat and I am wanting to make some adjustments: Legibly mount the file name date. Adjust in log file to tell which package name . dtsx was executed Decrease…
-
6
votes2
answers849
viewsWhat is the difference between SET and SETX?
To fix a new environment variable in Windows I checked that there are commands SET and SETX. What is the exact difference between the two commands?
-
6
votes3
answers342
viewsHow to escape characters in Windows Batch?
I have the following script: start "" "https://site.com.br/app/index.jsf?username=nomecabuloso&token=tokenzera" But when I do, it’s only index.jsf, it opens the following url:…
-
6
votes1
answer1028
viewsWhat are the differences between . bat and . cmd?
We rarely see file .cmd, but when opening it, we see that its content is very close to a .bat. What is the reason for this similarity ? What would be the main differences between them ?…
-
5
votes2
answers1007
viewsWindows Ping should return only response values
I’m doing a script and I need you to Ping or Fping in windows return only the values of time, without the ms, guy: ping 8.8.8.8 Disparando 8.8.8.8 com 32 bytes de dados: Resposta de 8.8.8.8:…
-
5
votes1
answer3608
viewsRun Python file with arguments
In my program, I do the following operation: import sys qtd_ponts = int(sys.argv[1]) I would like to know a practical way to run this file .py passing arguments without needing an IDE, using files…
-
5
votes2
answers4322
viewsHow to make decision structure to change color in a bat?
Hello, I would like to know how to make a decision in the following situation: I have a cmd window with a constant ping, I wanted the script to analyze when the ping is normal the letters of cmd are…
-
5
votes2
answers6054
viewsWindows CMD - Setar String with Accentuation
I am trying to create a Batch (CMD) in Windows that "sweeps" folders in a particular directory and then renames the sub-folders according to a criterion I set. I am using the code below to carry out…
-
5
votes1
answer812
viewsHow to send special characters from CMD to a file?
I want to send the character > to a file via CMD but I’m not getting. The following example illustrates my difficulty: echo casa > cidade > Estado >Arquivo.txt In the above example you…
-
5
votes1
answer3400
viewsHow to create . BAT to rename multiple files into multiple folders by inserting date and time of creation?
Someone knows how to create .bat to rename multiple files into multiple folders by inserting date and time of creation, not the current date? Example: Nome Data e hora de Criação SCP Dados.mdb…
batchasked 8 years, 3 months ago Augusto Vasconcelos 59 -
5
votes2
answers2948
viewsHow to check if a windows service is installed, if you are starting the service via batch file
I need to run a service for some processes, but first I needed to check if the service is installed. The commands I use to install and uninstall are as follows:: %DIRServico%\SERVICO.EXE /INSTALL…
-
5
votes2
answers3041
viewsInclude task in Windows task scheduler via batch
I do the configuration of several types of backups per batch, the codes are not pertinent to this question, but what it takes is always configure them by the Windows Task Scheduler. There are some…
-
5
votes1
answer5532
viewsIn a file . bat (Batch) how to rename a file using variables such as %userprofile%?
I am wanting to rename a file that is found on the Desktop using batch script. The only line that’s going wrong is this: rename "%userprofile%\Desktop\Lista.xlsb" "%userprofile%\Desktop\Lista -…
-
5
votes2
answers291
viewsCmd text box functionality for Git
I’m developing a .bat, which will make a series of commands from the git predefined. But one of these commands, it is necessary that the user type an operation message. Follow the series of…
-
4
votes3
answers589
viewsIs there any way to run batch files during the build of a Maven project?
I have a. bat file that performs some prerequisites during the build of my Maven project. I want to run this file . bat automatically when I build the project I developed Is there any way to…
-
4
votes1
answer3736
viewsHow do I give an echo without breaking line?
I have this line in the file .bat for /L %%a in (1,1,3)DO echo %%a Printing: 1 2 3 but I want you to print on the same line, this way: 1 2 3…
batchasked 10 years, 2 months ago Jazz Magnago 41 -
4
votes3
answers16370
viewsBat to enable and disable proxy
I need a bat to activate and disable proxy already with the ips set someone can help me ? To activate use the following command: REG ADD…
-
4
votes2
answers571
viewsBatch to choose drive letter
I’m creating a menu for deploy imaging via winpe. Inside this I run some commands and apply to files that are stored on an external hard drive. I even managed to make one if exist c:\IMG GOTO and…
batchasked 9 years, 9 months ago Luiz Gustavo Batista 81 -
4
votes3
answers11070
viewsBATCH SCRIPT - Automating website login
I have the goal to create a file . bat that automates my login on a given site. I can open the site with . bat through the start Chrome.exe command "meusite.com", and would like to know how to…
-
4
votes2
answers501
viewsOpen an executable file using VB or CMD
How to open a file from any extension, such as - Paçoca.legalcara an executable like - algo.exe using CMD or VB? Note: The path must be relative, which means that all are in the same folder…
-
4
votes1
answer3305
viewsCreating bat at runtime and process in Delphi
I have two functions that create a file bat and runs it, but I’m just not getting to create the process (CreateProcess returns False) and I can’t identify the error. I use Windows 7, 64 bit. I must…
-
4
votes1
answer1552
viewsCreate database via existing command line and overwrite
I have a Function (Delphi) that creates processes and executes BAT files that make, for example, backup a Mysql BD, like this: "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root…
-
4
votes1
answer9015
viewsHow to create a. BAT configuration file in windows?
I am automating some processes on a Windows server, and would like to create some files. bat for this but for such would be necessary the . BAT were able to read a configuration file so I did the…
-
4
votes1
answer297
viewsSend commands to a Batch with user input
Context: I have a Batch I can’t change, its function is to list some files in a specific directory, and after it lists the files it is waiting for some user command. Problem: I would like to…
-
4
votes1
answer9720
viewsHow to list folder files on the network
Context: Sometimes every day I need to gather information from folders on the network, where it has several subfolders and files. Need: I need to gather that information faster, so I thought put a .…
-
4
votes2
answers178
viewsFind files on local drives using Batch
Good morning dear friends, my knowledge of script is very limited and so I would like to count on the help of the community in the following question. We have some excel files of specific names on…
-
4
votes1
answer1323
viewsWhat is Delayedexpansion and why is it not enabled by default?
Usually when creating a batch that uses any code block, such as loops for or if, we ended up going through this problem and then we discovered the need to set EnableDelayedExpansion. Codes like this…
-
4
votes1
answer6483
viewsWhat is the most appropriate way to batch test ERRORLEVEL?
I’ve seen several forms of testing ERRORLEVEL in batch scripts. Some of them are dangerous and others are wrong, but sometimes go unnoticed. Below are some examples I know: Dangerous: the test works…
-
4
votes3
answers1204
viewsCreate bat to move files returned by findstr
Good afternoon to all! I have come across a daily problem where, I have several . xml to open and check if these have tags: < desc_produto >Riscos< /desc_Produto >" or <…
-
4
votes3
answers1929
viewsOperations with dates (delete file with date in name and earlier than 6 months) without using Forfiles
It’s been a long time since I’ve dealt with VBS, so I thought I’d just do it on the command line I need to delete files earlier than 6 months from the current date, as the files I am managing have…
-
4
votes1
answer315
viewsSilverlight Lightswitch - [Noelements] Debug resource chains not available
I am responsible for supporting a web platform made in Silverlight, in which I am not allowed to change anything in its code. The customer has complained that sometimes there are some strange…
-
4
votes1
answer1017
viewsCreate File Name with Day of the Week
I need to create a routine that does the backup with the name of day of week in order to comply with the following layout: Example: backup_01012019_second.7z The closest you could find that didn’t…
-
4
votes2
answers6606
viewsAutomatic installation script without user interaction
I need to run the ocsinventory agent installation automatically via script, which will be started by the domain’s GPO, and can be in . bat, . vbs or powershell, and there can be no user interaction.…
-
3
votes1
answer5683
viewsHow to run a R script from the Windows command line?
I have a test file. A in the folder: C: Users Documents R And I’ve already added R to the windows PATH: C: Program Files R R-3.0.2 bin When in the cmd I try the command R CMD teste.R Windows does…
-
3
votes1
answer610
viewsERRORLEVEL command with colors?
I created a script bat to tesar some links, to using the command ping with the errorlevel And it’s working perfectly, but I wanted when I didn’t have communication, I mean, don’t drip, it would be…
-
3
votes1
answer1942
viewsProgrammatically set Google Chrome home page
To define the home page of Internet Explorer, we can do as follows: REG ADD "HKCU\Software\Microsoft\Internet Explorer\Main" /V "Start Page" /D "http://www.google.com/" /F But for Google Chrome…
-
3
votes1
answer1205
viewsHow to make a batch file run a Console Application by passing parameter?
I have a Console Application that method main of Program.Cs (where the application starts) receives a input. Follows code below: static void Main(string[] args) { var input = Console.ReadLine();…
-
3
votes1
answer2751
viewsBAT for telnet access passing user and password
How to use a bat to access a host via telnet to automate backup. I tried to call the telnet, but. how to pass the user and password and be recognised. It only opens the prompt of telnet and ask me…
batchasked 9 years, 3 months ago Vinicius Avanzi 47 -
3
votes1
answer996
viewsHow to make a program download images from a website, page by page, using id?
I need to download several images from a website, where only the page number changes, but the id of tag img is always the same. I wonder if there is any way to create a program that does this…
-
3
votes2
answers371
viewsBatch to locate service with special character
I am trying to make a bat to connect a Windows service that has special character "Ç", but I could not reach any viable code. Always returns me error 1060. That’s kind of the structure of my bat: SC…
-
3
votes1
answer58
viewsJRE 8, TDM-GCC Mingw: Silent installation
Does anyone know how to silently install JRE 8 ( jre-8u65-windows-i586 ) via a bat file ? And if possible they could also tell me how to install TDM-GCC ( Mingw32) in the same way ? For those two…
-
3
votes1
answer1842
viewsCalling PHP function by BAT file
I need to create a BAT file that should run every 25th day. It should perform a function called emailAniversariantes(), which has been set for programming a website within two files (controller and…
-
3
votes1
answer172
viewsHow to Recover Updated Date in Batch
I made a bat file that changes the windows date. However, I also need another bat file, so when executed, it recovers the updated date. How to proceed?
batchasked 8 years, 4 months ago Clara Campos 417 -
3
votes1
answer2466
viewsCreate . bat file to open Node.js terminal and run one or more commands
I would like to create a file . bat to automate a process I have to perform every day. Whenever I start working, I open the nodejs terminal, access my project directory (in my case I use Babel) and…