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
-
3
votes2
answers13268
viewsHow to delete files in a directory with batch script?
I need that when executing one script cmd. it erases all files with the following extensions: .txt and .mp4 if any. These files are located in the following folder C:\comando\batch\diretorio\teste…
-
3
votes2
answers968
viewsBat file to run file. r
I would like to use a . bat file to run a particular file. r daily with windows taskmanager, but I’m not getting it running. My steps are as follows: 1) open Notepad 2) enter code, which is…
-
3
votes1
answer1865
viewsStore user logged in variable . bat
I have to create a bat to automate the installation of the company’s standard programs, but one specific is giving me a headache. The installer of one of the programs by default creates the path C:…
-
3
votes1
answer551
viewsOpen multiple programs on different desktop using script in windows 10
I’m wanting to open some programs on different work screens that I have to use frequently. And I was wondering how do I make a script to automate this. I made a simple little script. bat to make it…
-
3
votes1
answer1177
viewsHow can I run my script when I’m sure it’s run as administered?
I want to run a batch(.bat) and check if it was opened as an administrator, here’s an example of what I want on linux: if [ `whoami` == 'root' ] then echo I am root else echo I am not root fi I…
-
3
votes1
answer753
viewsHow to run a script without worrying about special characters?
I made a batch for windows to install some programs and make settings automatically, it worked normally, but when doing a test using a folder that had space in its name it stopped working, put in…
-
3
votes1
answer418
viewstake the last 2 tokens of a variable in Batch
I need to pick up the last 2 tokens of a variable batch the variable is Rastreando a rota para user722-PC [192.168.1.106] the output I need is a variable containing user722-PC and another containing…
-
3
votes3
answers528
viewsHow to deactivate CTRL+C in batch?
You can deactivate the CTRL+C command in batch?
-
3
votes3
answers2628
viewsscript for printer installation automation
Good afternoon guys, I have in my environment a print server with a total of 63 printers installed and shared on the network, I would like a script for automating the installation of these printers…
-
3
votes3
answers1953
viewsBatch script to rename file extension recursively
I need a script in bat that allows to rename all files with EXTENSION *.rar to *.cbr , need to rename any file in the subfolders from the root D: Downloads. The command I made is like this ( Ren…
-
3
votes1
answer52
viewsSet Space for text
Good afternoon, I would like to know if there is a cmd command to set a fixed space for the text so that it does not change the position of the rest of the sentence. In the example below this space…
-
3
votes2
answers1000
viewsHow to get the pid of a windows process right after the process is run
How to get the pid of a windows process right after the process is executed, similar to the command $! that retrieves the pid from the process that was executed needed in a way to grab that pid from…
-
3
votes2
answers162
viewsHow do I set up Git to ignore trivial changes (for example, file timestamp) in a file?
The problem I’m facing is this:: The C application has an option where the build date of the application is displayed. To prevent the developer from managing the application before the current day…
-
3
votes1
answer763
viewsEnable or maximize program window
I have a JAVA program that uses Selenium Web Driver to access some pages and print them. I print by simulating the Ctrl+P keys and then Enter. The problem: There are several pages and several…
-
3
votes1
answer549
viewsCopy Parent folder with FTP and Winscp in bat file
Talk to the guys, baby? I’m venturing to create myself a backup tool for an FTP, and I’m using Winscp to connect and use the Synchronize command for me. set FTPSERVER=MEUHOST set FTPUSER=USUARIO set…
-
3
votes1
answer547
viewsRun a Spring Batch job several times
By default, Spring Batch does not allow you to execute a job that already has a complete execution with the same parameters. If you try to run, get the message: "A job instance already exists and is…
-
2
votes2
answers304
viewshow to terminate program in windows from Matlab?
Is there any way to terminate a program in windows from a command in Matlab? Possibly using a batch... but I don’t know the commands to manage programs in windows or how to run it from Matlab. I can…
-
2
votes1
answer807
viewsApplying recursion in a batch script
Some time ago I came to the need to use the Microsoft Office Document Imaging to convert a document template created in Microsoft Word as an anti-copy prevention measure of the model itself…
-
2
votes1
answer732
viewsGet font name in . bat
I’m using the script below to install fonts in Windows, but I wonder if there is a way to get the name of face source. For example, the source file name is BebasNeue.otf, but the name of her face is…
-
2
votes1
answer839
viewsWindows Ping should return only the package response values
I am making a script as ping command and I want to get only the response of the sent and received packages, so far only be able to display the ping media using this variable : for /f "tokens=*…
-
2
votes0
answers263
viewsPrint all photos in a batch folder
Hello, I am trying to make a batch that prints all the files of a folder, but in the print queue appears "document of lower level local" and in the status appears "Error - printing" What could it…
-
2
votes2
answers3791
viewsWrite current Directory to a text file
In a batch program I have: echo Date >c:\users\...\testecmd.txt Write the current date in a text file. Assuming I don’t know where is the directory in which the auto executable is, how do I get…
-
2
votes1
answer748
viewsbatch script - move parent directory and subdirectory
as I create a ".bat" to move all files in specific or better only those with extension ".txt" from one directory and all its subdirectories to another folder.…
-
2
votes0
answers696
viewsKeep session active for multiple requests using CURL is too slow
I made a script to post ads automatically on a classified site for a particular user. I store the ads ID locally in the database, then with CURL, I log in, and then loop on each ad ID to activate it…
-
2
votes1
answer1292
viewsHow to create a windows environment variable
I need to create an environment variable in windows, through a batch. I can create a local variable with set variavel=valor But I need to access this value through other batch. how do I create a…
-
2
votes1
answer2332
viewsBat to finalize process and close application on desktop
In the company that works we have an application called Socket developed in java to run files in the browser, but I need a bat to kill the process and close the icon of the application and start it…
-
2
votes2
answers1450
viewsGenerate error at the end of the copy in case some file is not copied
I have a batch that copies some files on the network, this copy updates the previous files by the newer ones if they already exist in the destination folder, but if any file is in use the system…
-
2
votes1
answer83
viewsC++: Compile using Batch
I’m using cmd to program, and I want to make a batch file that automates the build process. I want him to Compile the files using the command g++ -c ./scr/Nome.cpp -o ./obj/Nome.o -std=c++1z This…
-
2
votes1
answer124
viewsDelayed expansion in loop body is using /f option
I reduced the code to be brief: @echo off setlocal EnableDelayedExpansion set /a n_tokens=2 for /f "tokens=!n_tokens! delims=\" %%s in ("Program\Executable") do ( echo %%s ) pause > nul I know…
batchasked 7 years, 2 months ago axell-brendow 605 -
2
votes1
answer1052
viewsReturn File Name in Batch
Is it possible to return the name of a file/program by a bat? Type by dragging it to the bat or run by the bat, it returns the name.
-
2
votes1
answer51
viewsWhy is my menu not working?
I’m creating a Batch menuzinho to run a 1-line script that merges all text files into 1 only. But I don’t understand why the routine isn’t working. Setup Batch Code @echo off :Menu Echo. Echo 1 -…
-
2
votes1
answer157
viewsHow do I remove everything after the first word?
How to remove everything after the first word on each line in a text file containing the character pipe? It works for removing simple/common characters, but has not worked to remove the character |…
-
2
votes1
answer1222
viewsHow to enable/disable windows 7 devices through a . bat or other file type?
I need to enable and disable a specific device (device manager) frequently, and doing it manually is very annoying. I believe that with a . bat file it is possible to enable/disable each time I run.…
-
2
votes1
answer172
viewsDetermine an amount of time to respond to something in Batch
Is it possible to determine an amount of time for the user to answer a question in a batch? If I were to use a batch to shut down the computer, the user would have 1 minute to respond to something…
-
2
votes1
answer355
viewsCreate a scheduled task on Windows XP 32-bit
I want to create or modify a task per command line, that on the same machine. I’m using the command Schtasks with argument /Create. But I only got on Windows 8, when I took the BAT to the machine…
-
2
votes1
answer275
viewsScript to identify 2 active services, take down the 2 and go up only 1
Next, I have a service here in my environment that runs on some machines, however this service can not be duplicated ( can not have 2 active services at the same time ) I wonder if it is possible to…
-
2
votes1
answer2306
viewsScript to check running process and finish or not
i have a process called monitor.exe and the same can not have 2 active processes because it is a print monitor that if you have 2 active processes the same will issue 2 duplicate tax notes, so I…
-
2
votes1
answer154
viewsHow to show congruent sign ( ) in cmd
I was trying to make a "design" with ascii in cmd but this character set comes out: "Ôëí", I know q is because of the character delimitation that cmd can show and etc., but can help me?
-
2
votes1
answer101
viewsDate and time format on xls/csv conversion
I have a code that works, but I need help with the date format. On the conversion of xls to csv converts the date to mm/dd/yyyy and time to h:mm and I wanted it to be dd-mm-yyyy and the time to…
-
2
votes0
answers128
views -
2
votes1
answer374
viewsRename all files from the directory where you have "u0026" to "and"
I have more than two thousand files with "u0026" in the middle of the names (in this case it would be &) and I need a script that can without php or batch to rename all keeping the original name…
-
2
votes3
answers3006
viewsSearch directory name of a file. bat
I have a. bat file that does some iterations via cmd in several directories. My problem is this: I need to be able to get the directory of the file itself . bat to always be back to the same to make…
-
2
votes1
answer81
viewsTest a port and capture a batch test response
I wonder if it is possible for me to run a test to know if a port is open, as with the telnet command, but to get a response as with ping that I can trigger another action with errorlevel 1 or 0.…
-
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
votes2
answers413
viewsHow to create batch files with variable
Hello, I don’t know anything about programming. I found out how to create scripts . bat and I’m using it to make my life easier. Every day I have to open several web pages in my work, so I created a…
batchasked 5 years, 11 months ago Bruno Santiago Franklin 23 -
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
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
votes1
answer220
viewsHow to authenticate to a Firewall web page via Powershell/Selenium?
I developed several Powershell scripts to automate the configuration of machines I work on, speeding up and avoiding the heavy work of manually setting up a giant number of stations. Basically they…
-
2
votes0
answers84
viewsBatch to delete multiple users
Good afternoon, So, I have to do a weekly wipe on a machine that is connected to a domain, and delete all of its (network) users. My plan of action was to create a Batch that delete all user folders…
-
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?