Batch processing is the execution of a set of commands or software programs without user intervention. A batch file is a text file containing a sequence of such commands or programs invocations. Please use the tag [batch-file] for that.

learn more… | top users | synonyms

1
vote
1answer
3k views

Create a Batch file to backup and restore Network Printers for All Users

I have an XP machine with multiple profiles. These profiles sometimes have different printers mapped to each user. Example: User A has network printer 1, 2 and 5 mapped. Printer 2 is default. User B ...
1
vote
2answers
31 views

I need a batch file that opens cmd, runs two commands, and keeps cmd open

I am making a set of batch files made to force restart games when they freeze and won't start back up again. So I need a batch file that opens cmd.exe, runs the two commands: taskkill /F example.exe ...
0
votes
0answers
10 views

Batch File Property File String Search And Change the Value to user inputting value

I have a batch file to search a string in a property file and after finding the string, replacing its value to anew value...This script was working fine since last month.Now it is doesnot working in ...
-1
votes
1answer
28 views

Script to delete folder with time condition

I wrote a command to create a folder named with day's date and copy some file and folders to it. @echo off for /f "tokens=1,2,3,4 delims=/ " %%a in ("%date%") do set wday=%%a&set ...
1
vote
1answer
422 views

Task doesn't complete if it is run by System (so it's hidden)

I'm making an application using Python to parse a webpage. For reference, this is the program's code: import csv from selenium import webdriver from selenium.webdriver.common.keys import Keys import ...
0
votes
0answers
23 views

Running batch file in different folders doesn't always run?

So, I have this script because I use a program called Free File Sync on Windows 10 Pro. While copying, I received an error preventing copying over some files. The files in question were downloaded ...
5
votes
3answers
6k views

́╗┐' is not recognized as an internal or external command

When executing certain files (mainly batch) using PsExec I get these weird ́╗┐' symbols before my command. My initial thought was, that I were using wrong encoding, but after checking, I realized that ...
0
votes
1answer
13 views

Mac OS X 10.9.5

I need to run a .bat file on my Mac, the file is a portable version of R called RCommander and I need to run it because it comes with all packages I need to work with and I have problems to download ...
0
votes
0answers
28 views

Pipe loop's output into variable, than check with if else

I have the following batch script: @ECHO OFF SET "TLD=.com" FOR /F "tokens=*" %%i in (%cd%\files\domains-win.txt) do ( whoiscl -r -n %%i%TLD% | FINDSTR /I /C:"Registrant Name" > NUL ...
1
vote
1answer
37 views

Batch: Return the matching lines from pipe's output to the console with regex

I have the following domain checking bash script in Linux: #!/bin/bash TLD='.com' while read -r domain; do whois -H $domain$TLD | grep -oPaq '^.*(Creation Date|record created).*$' if [ $? -eq 0 ...
-2
votes
0answers
18 views

bat file to find image dimension and set into image tag [closed]

bat file code to find dimension (width and height) of multiple images that located in image folder and set that dimension in image tag in html pages according their image name. i am try using this ...
0
votes
1answer
15 views

CMD Batch rename. Read new names from text file

I have a directory of product images that I'd like to rename to the products's UPC. I have the file name mapping in a spreadsheet, so I can export it to CSV or tab delimited. Given filenames.txt: ...
1
vote
0answers
11 views

Prevent PC from sleeping while running Photoshop batch

I'm running Windows 10 and latest version of Photoshop CC. I started a long running batch and I assumed Photoshop would keep the computer awake, but apparently it doesn't. Is there a setting in ...
-1
votes
0answers
30 views

command doesn't stop when finds a hit? [closed]

I use ncrack and this is the code I use inside a bat file and this are all my 6 pass lists: Ncrack running 1 pass then 2'nd pass then 3'rd pass etc....but.. ncrack --user Admin -P pass1.txt ...
0
votes
0answers
14 views

Configure network settings based on available wireless networks

Good day- I work in a variety of locations each with their own IP settings - some static, some DHCP, some wireless, some hardwired. I've written a bunch of batch files to quickly set and reset ...
1
vote
0answers
23 views

Mkvmerge batch for change default audio

I want to change the default audio of my files but there are too many. How can I do it with cmd or bat file? This is my code for one file: "C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language ...
0
votes
0answers
15 views

How can I add extra commands/arguments when opening Command Prompt with PsExec?

I'm creating a shortcut to open Command Prompt with SYSTEM privileges, it works fine, but I want the title of the resulting cmd window to be clearly labeled with something like "SYSTEM". So I want to ...
0
votes
0answers
8 views

Create subfolder and move zip files into subfolder

I am needing a batch file that will create a subfolder, and move my zip files to subfolder. Example of what I am looking for Parent Folder MyFolder1 XXXX.zip YYYY.zip ZZZZ.zip ...
0
votes
1answer
41 views

Delete folder without certain content

I would like to batch-delete all folders which don't contain a specific file. It's about a working folder with hundreds of projects. I want to remove every folder that doesn't contain a "main.c". How ...
34
votes
12answers
100k views

How do I create a Windows Batch file that does not show the Command Prompt when executed?

I have installed a ruby gem called Redcar, which is launched from the command line. When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing ...
0
votes
0answers
10 views

Batch converting .rar to .7z - path variable?

I found someone who had written a very nice batch script to convert .zip to .7z, and im attempting to make it convert .rar to 7z. I am able to get the script to work but I cannot figure out where the ...
1
vote
1answer
28 views

WMIC in for-loop

I'm trying to get WMIC output into a variable so I can process it further. I have made a test batch file to illustrate the problem: wmic PROCESS where "commandline like '%%teststr%%'" get ...
1
vote
2answers
529 views

Wmic output into variable

Am trying to write the output of this command into a variable, but can't quite get the syntax to work... My WMIC query is: wmic PATH SoftwareLicensingProduct WHERE "ProductKeyID like '%-%' AND ...
0
votes
2answers
3k views

Copying a set of local files to FTP server

I want to copy a set of local files to ftp://124.30.124.230 (it will ask username and password). I want to do this work on 400 systems. I have planned to do this work by creating a batch file and ...
0
votes
0answers
14 views

cmd not closing only for flash drive

I'm having trouble with cmd not closing. I had these two lines %SystemRoot% /explorer.exe "C:/users/me/Documents/myfolder" %SystemRoot% /explorer.exe "M:/workfolder" I tried using "start" and ...
4
votes
4answers
5k views

How to get the Visual Studio installation path in a batch file

Normally, the path is something like C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\. From Visual Studio, one can use $(VCInstallDir)$ to get this path. Q: But in a batch file, how to get ...
0
votes
0answers
15 views

Extracting zip files within zip files

I have a file which contains an unknown extremely high number of zip files, only within each other, and a file at the bottom, like so: ...
0
votes
2answers
33 views

Batch file unable to access Program files X86

I need to be able to run a simple ROBOCOPY on a backup file that is location in: C:\Program Files (x86). I get an error when I try to test I get an error saying that it doesn't like the x86. I have ...
0
votes
0answers
18 views

Move files in sub folders to parent folder avoiding overwrite by changing filename

In continuation of the question I asked here: I would like to ask how it would be possible to still do the move, but still avoiding the overwrite by changing the filename. Like for example adding a ...
3
votes
1answer
21 views

batch file to move files from sub dirs to root dir with overwritting files with name conflicts

So requesting some help, I am currently trying to sort out a mess in my google photos. I have downloaded the archive of my google photos and have a bunch of folders with files/photos in them. I am ...
1
vote
2answers
58 views

Batch compress .avi files with ffmpeg which contain previous date in their name

im trying to manage CCTV footage, and im trying to batch compress them with ffmpeg So far i managed to come up with this command ffmpeg -i "0515 210004.mp4" -b 200000 output.avi But i need to do ...
0
votes
1answer
45 views

Move file recursively to parent folder [duplicate]

I'm on windows 10, I need a batch script or a powershell script to solve this problem. I have downloaded the flash tv series, the structure looks like this flash tv series folder episode 1 ...
1
vote
1answer
7k views

How do I upload a file to an FTP server using a batch script?

I have created a batch file called FTP_automation.bat which contains the code below. SET MyPath=E\PGP\test_pg ftp open 142.245.30.165 21 TESTA9MS test11 binary put %MyPath% quit Pause When I am ...
2
votes
1answer
23 views

Windows batch: Get the first folder name starting with some value?

I have a batch file in which I pass the name of the folder I want to use as a argument. But now I want to make it a little smarter by letting the user specify only the first few characters of the name ...
24
votes
11answers
91k views

Populating Array in DOS Batch Script

How can I setup an array variable in a DOS batch script? I would like to load it with a list of file names to process. I really would like to keep this as simple as possible. Thank you.
54
votes
17answers
223k views

Run a batch file in a completely hidden way

I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..). I don't want to use some program to do that, I'm looking for something ...
0
votes
1answer
36 views

I want to schedule a batch file to execute a command and redirect that output a text file

I want to schedule a batch file to execute a command and redirect that output a text file. This is my current solution: Del \\10.112.232.10\Netbackup_Softwares\Personal\Bharath\VM_Query\switch.txt ...
0
votes
3answers
3k views

Batch script to append record to csv files

I have a bunch of stock data in csv's that I am backtesting trading strategies on. The problem is that my strategy buys the open market price if a signal was found yesterday, unfortunately my data is ...
1
vote
1answer
19 views

How to put unicode in Cmd/Batch?

So, i'm trying to make a nice batch menu but everytime i try to use unicode's fancy lines i just get random characters. Is there any way to put unicode in cmd and or a batch file?
-1
votes
0answers
21 views

How do I compress an “echo” command in batch to a paragraph?

I am using a batch script that takes a random line from a text file, sets it as a variable, and then echos it, the problem here is that some lines are too big, and go off of the screen.
0
votes
1answer
37 views

How to start a server via Jenkins without outputting the server trace in the Jenkins console?

I have written a windows batch script to start an apache tomcat server via Jenkins. When the server starts to run, server trace is shown in the Jenkins console. But all on a sudden the window of the ...
1
vote
0answers
35 views

How do I use a batch script to find and copy specific files (.pdf) to targeted location from a list? [on hold]

We have a lot of files (PDF format) in different folders, these folders are in one root folder. I have a text list of all the PDF file names I need to find and copy from these folders to a targeted ...
7
votes
4answers
14k views

Windows: How to add batch-script action to Right Click menu

I have a few programs that creates temp files or backup files or similar files that are not important. For example, GVim for Windows by default creates a backup file in filename.txt~. I sometimes ...
1
vote
1answer
230 views

Batch convert a folder of .mkv files to .m4v files using ffmpeg in MAC OS X

Is there a way to batch covert a folder of .mkv files to .m4v files using ffmpeg in Mac? I setup a service that will do individual files, but I really would like to batch them. The 'Run Shell ...
0
votes
0answers
293 views

How to automate software registration via batch or script

We use a program called vspace created by ncomputing. This allows for example 4 stations on a single host machine. So, each time this is installed we have to fill out the registration form which pops ...
0
votes
0answers
16 views

Fix many broken shortcuts in batch in Windows7 [duplicate]

I recently re-organized some folders on my computer, killing upwards to 100+ shortcuts in the process. Rather than manually creating new ones, I was wondering whether there was an automated way of ...
0
votes
0answers
38 views

Do Copy Keyboard Settings to the Welcome Screen via batch script or registry tweak

To copy keyboard settings to Welcome Screen on Windows 7/8/10 you need to perform this steps: Go to Control Panel -> Language -> Advanced Settings Click "Apply language settings to the welcome ...
0
votes
0answers
37 views

Batch: Run with GPU command?

I have a laptop with nVidia and Intel graphics. When I launch a programm, by default it uses Intel graphics, but I can make it use nVidia. Question: Is there a way to do the same(run it with nVidia ...
1
vote
0answers
13 views

how can I get a Batch File to Delete a folder if it doesnt contain a specific file

Hi I'm new here and was hoping someone can help me with a problem I have. Over the years I have acquired a number of ebooks (several thousand). So I have decided to only keep my mobi and Epub books. ...
1
vote
0answers
21 views

How do I edit / create a new batch script to setup a bulk download from a series of links (with script)

A few weeks ago, I posted this question and got a wonderful answer. I tried to apply the same techniques used to the following set of code for another website, but failed. The command prompt window ...