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

0
votes
1answer
9 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
26 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 ...
-2
votes
0answers
17 views

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

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 ...
1
vote
1answer
36 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 ...
0
votes
1answer
14 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
10 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
29 views

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

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
12 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 ...
1
vote
0answers
20 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
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
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 ...
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
26 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 ...
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 ...
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
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 ...
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 ...
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 ...
0
votes
1answer
42 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
2answers
55 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
40 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 ...
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 ...
0
votes
1answer
35 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 ...
-1
votes
0answers
20 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.
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
vote
0answers
35 views

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

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 ...
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
36 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 ...
0
votes
0answers
37 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 ...
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
19 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 ...
0
votes
1answer
16 views

ffmpeg local expansion and running a command within

Big time n00b question.. I just can't quite figure out what I'm doing wrong. Here is my .bat file: @ECHO OFF SETLOCAL set /p Input= Drop file here, and click enter. set file=%Input% FOR %%i IN ...
0
votes
0answers
40 views

How to disable IPv6 through cmd script

I don't want to manually uncheck the IPv6 checkbox in network connection. I want to make a cmd logon script to disable IPv6 for a dozen of computers. I have tried: netsh interface teredo set ...
0
votes
0answers
55 views

What command will ensure a Command Prompt window always stays on top/at the front?

I am writing a silly little program in batch, and I want to make sure the CMD window is always at the front of any other windows that are called by the program. Here are a few lines as an example of ...
1
vote
0answers
15 views

WMIC Fails When Connecting to Computer with Multiple IP Addresses

I am trying to run a restart script against a list of computers, where it uses WMIC to see if users are logged in: WMIC /NODE: "workstation_name" COMPUTERSYSTEM GET USERNAME and then use psshutdown if ...
1
vote
0answers
26 views

Java runs in batch but not Powershell

I have a batch file that runs a jar with a few parameters, works fine: @echo off java -cp bulkconfig.020.0005.jar com.hospira.bulkconfig.LoadConfig %* I would like to add some more cababilities ...
1
vote
1answer
26 views

Get path relative to batch file - not working directory

I have a batch file in E:\dir0\dir1 that calls exe0.exe in that folder. I need the first argument to the exe to be E:\dir0\dir2\dir3\script.js. The problem is that the name of dir0 (and whatever ...
1
vote
2answers
28 views

Using setx to append to user PATH

My attempt: setx PATH "%PATH%;%~dp0" How do I do this without everything in system PATH getting duplicated in user PATH?
0
votes
0answers
36 views

How to batch install setup-file (*.exe) on PC?

Instead of repeatedly double-clicking tens of setup files (*.exe), can batch-installing at once be possible? Or at least one double-click is enough to sequentially activate them? The closest Google ...
0
votes
1answer
18 views

Add backslash if a string doesn't have it

I'm developing a command line Batch file on Windows 7. I'm trying to add \ to a dir if it hasn't. This is only a test: @echo off set solutionDir=%CD%\ echo %solutionDir% if [%solutionDir:~-1%] ...
0
votes
2answers
40 views

Why is it errorlevel 0 even if string is not found?

If I run this code: :loop (type "File" | findstr Idle) > nul 2>&1 timeout 1 if errorlevel 1 goto loop Then if the string "Idle" cannot be found within File, it will start over at "loop" ...
0
votes
0answers
14 views

How can I use the directory path of a batch file WITHIN that same batch file? [duplicate]

I want to use a batch file to create directories and copy other batch files to those directories. This is to automatically 'install' different batch programs by copying them to 'program files', ...
3
votes
1answer
23 views

Get mac address of detected bluetooth devices

How can I find out the mac address of all bluetooth devices the adapter has detected (not necessarily already paired with)?
1
vote
1answer
34 views

Windows Command Line - List Network Adapter Components

I'm looking for a way to, in a batch file, get a list of the components (such as NDIS drivers) in use by each network adapter on the system. Here's a screenshot of the info I want in the network ...
1
vote
2answers
17 views

Sending accented characters to Clipboard from a batch file

I've been trying to find a solution to this, but I wrote a basic program to automatically produce an "outage" report more or less, that I need copied into the clipboard so that I can paste it into a ...
0
votes
0answers
37 views

Looking to rename large amount of files using bat script

I'm still pretty new to the use of powershell, scripts, and the like, so I'm sorry that I don't have some form of script to start with. All I have is the specifics on my problem. I have a large ...
1
vote
0answers
33 views

Controlling encoding of redirected win console command output

Here is what I want to do: Redirecting properly the output of console applications (I use the term command in the rest of the message) into a file with 1252 encoding (to make it readable from any ...
1
vote
1answer
31 views

Permanently setting PATH from CMD windows 8

I'm setting up a custom command line utility, and the 'installer' adds a PATH entry. It works after this for the current session. After I close and open the command prompt, the PATH is reset and the ...
1
vote
0answers
26 views

Having a message box used as a variable in batch program

I am attempting to have a batch program pop-up with yes or no options and depending what the user clicks will determine what the program will do. for example: @echo off Echo x=msgbox^("Yes or ...
3
votes
2answers
42 views

How to find count of lines present in a file using batch script

I want to count the number of lines in a file using batch. I have gone through this, but couldn't understand as I am a beginner. I have written my own piece of code with basic knowledge. @echo off ...