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
6 views

Add backslash if a string doesn't have it

I'm developing a MS-DOS 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%] EQU [\] ...
0
votes
2answers
11 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" ...
3
votes
1answer
14 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)?
0
votes
0answers
12 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', ...
1
vote
1answer
23 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
1answer
12 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 ...
-2
votes
0answers
21 views

Rename one filename by appending another filename in subfolders in windows

I need to rename bunch of pdf files by appending one file name to the other in sub folders. Parent folder has lot of subfolders and each subfolder contains two pdf files. eg., a subfolder contains ...
0
votes
0answers
30 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 ...
7
votes
4answers
13k views
+50

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 ...
0
votes
0answers
15 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 misuse term command in the rest of the message) into a file with 1252 encoding (to make it readable from ...
1
vote
1answer
24 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 ...
0
votes
2answers
160 views

Suppress output of nslookup command in batch file

Trying to cleanup my batch file... Having problems with the following command still printing out some info: FOR /F "tokens=2" %%a in ('nslookup myip.opendns.com resolver1.opendns.com') do (set ...
3
votes
2answers
33 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 ...
0
votes
0answers
17 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 ...
5
votes
4answers
24k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...
0
votes
2answers
599 views

How can I batch convert subfolders of images into single PDFs?

I'm surprised I couldn't find an easy script for this online. I have a directory with lots of subdirectories, each filled with TIFFs. How can I batch convert subfolders of multiple images (TIFFs) into ...
1
vote
0answers
41 views

Logon Script with net use * /delete /yes

I'm trying to get rid of all manually mapped network drives on all workstations in my domain. I want our end-user's mapped drives to be mapped solely via GPO (GPO's are already in place). I'm trying ...
1
vote
1answer
14 views

Parse an output of a command to disconnect a remote desktop session

qwinsta administrator | findstr Administrator Gives output as >rdp-tcp#26 Administrator 2 Active I need to get only the SESSIONNAME i.e. "rdp-tcp#26" and use in next ...
0
votes
1answer
32 views

How to print password protected excel files with batch script?

I have several folders with password protected excel files (one excel file per folder). On the 16th of every month I have to enter each password and print the excel files which is a little time ...
9
votes
7answers
31k views

Do something every 10 seconds batch file

I have a batch file: arp -s 192.168.1.254 xx-xx-xx-xx-xx-xx ipconfig /flushdns How can I do these two commands on Windows XP, every 10 seconds?
1
vote
1answer
25 views

Windows Batch to copy one file to multiple directories

I have a rather simple copy and paste batch job. That checks for a more recent file and overwrites it. I was trying to take a single COPY and copy it to a second directory. In simple, this Batch is ...
53
votes
17answers
218k 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 ...
3
votes
2answers
54 views

Loop/Batch file for extracting all .aac from .m4a files in folder

I'm desperate. I need to extract the .aac stream from ~1749 .m4a files with ffmpeg, but I can't get a batch file working for me and it would take years to do it manually. This is what I use for ...
1
vote
2answers
21 views

can't run console program in batch file

I have a batch file (run.bat) which is to change my IP address setting: netsh interface ip set address "lan" static 192.168.30.77 255.255.255.0 192.168.30.2 The command worked as I expected when I ...
0
votes
3answers
41 views

[invalid, mods plz remove]How would I prevent the command I am running from being displayed in the title of a cmd prompt? [closed]

I'm making an MMO, and for some reason, despite the title command, the command that is being run likes to be shown in the command prompt title on windows 10, and that command just so happens to be ...
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 ...
0
votes
1answer
14 views

Create a batch file to add a beginning and end to text file lines

Can anyone show me how to create a batch file to add a beginning and end to each line of a text file? I have a large list and it would take endless time to add this to beginning and end. Even a ...
1
vote
1answer
26 views

simple batch script not working PS, but works in cmd [duplicate]

I have a .bat script that just cds into a directory cddocs.bat cd \Users\Me\Documents\NetBeansProjects\ It is in my home folder. (C:\Users\Me) In cmd when I run it C:\Users\Me>cddocs ...
0
votes
0answers
7 views

Acrobat XI Pro how to suppress Action Wizard messages

I'm running the Action Wizard in Acrobat on Windows 7 to convert files to OCR PDFs. Each time it processes a file a window pops up and the Action Wizard overrides anything else I might be doing on my ...
1
vote
1answer
21 views

Batch file append slash to the beginning to string variable

I have a variable containing a path like this a\b\c And I want to turn it into something like /a\b\c I tried like this set SLASH=/ set HOME_MF=%SLASH%%HOME:\=/% and a number of other ways, ...
4
votes
6answers
26k views

How do I create an unattended installer for various applications in Windows?

I have had to reinstall my operating system today and there a ton of programs that I need to install, not to mention quite a few configurations to make after installing them! I heard some people are ...
1
vote
1answer
28 views

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

Background - I'm trying to bulk download some videos from a website. I have all the links and while I can manually open the .bat file and paste the link (and repeat), I was wondering if there is a way ...
0
votes
2answers
14 views

Batch operation returns “Divide by zero error” with the delayed expansion on and a valid operation

The following line of code is run trough my current project : set /a "hp = hp - ((atk*arandom)/((edef*6)/edefbonus))" And here's what it looks like when you replace the variables by their values : ...
-1
votes
1answer
28 views

Drop a file onto a desktop icon to attached it to a new email?

Hello Superuser Community! I already tried searching for a solution but I could not find anything. What I want to do is the following: I would like to be able to drop one (or best any number) of ...
0
votes
2answers
36 views

How to execute 2 commands inside a single runas?

When executed independently, they execute perfectly. When executed in 2 consecutive runasstatements, chrome.exe is executed before robocopy has had a chance to finish. When placed inside a single ...
-1
votes
0answers
24 views

How to putty ssh login and pbrun login using batch file

How to ssh login using putty, then running the pbrun with its login details, and to run a few commands using a batch file. Currently I tried doing: C:\path\to\putty.exe -load "[Sessionname]" -l ...
0
votes
0answers
12 views

Batch appending (set side by side horizontally) entire folder of images in pairs using imagemagick

I'm trying to figure out the correct command(s) to batch append (and output with a sequentially numbered (incremented) filename) an entire folder of PNG files, in pairs. i.e. I have a folder of ...
1
vote
2answers
25 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
2
votes
2answers
29 views

does start title and tasklist /fi windowtitle reference the same title?

I was looking up the start and tasklist commands, and i noticed 2 things. They both had references to a window title. start "myTest" /b somefile argA tasklist /fi "WindowTitle eq myTest" the thing ...
4
votes
2answers
8k views

How do I open a second Skype instance with a Batch file?

I want to launch a 2nd Skype instance from a Batch file. I have done that successfully with the run window: "C:\Program Files (x86)\Skype\Phone\skype.exe" /secondary But for the life of me I ...
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 in 400 systems. I have planned to do this work by creating a batch file and ...
0
votes
1answer
29 views

How to output net group command in list format in batch

I'm using the net group "Groupname" /domain command which outputs a bunch of users in the group in the format of 3 columns. There are spaces between the columns. How do I output the command so that ...
0
votes
0answers
19 views

Command Line to “batch” unrar many Archives into Subfolders accordingly

in Windows 10, i have an folder F:\archive with about 300 different "File 1.rar" "Otherfilename 307.rar" Knowing Linux better then Windows I spend some time to compile the following command and it ...
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 ...
4
votes
1answer
35 views

Batch script to delete specific folders

I want to be able to run a script at a parent folder that contains other folders, the script will delete all the folders of a certain name. So for example to remove all the bin folders and only them: ...
0
votes
0answers
29 views

How to connect to a wireless Display adapter automatically through scripts or Task Scheduler?

I am trying to project files to a Samsung TV which has a windows display adapter. I want to automate the entire process. So when the TV is switched on, I want the computer to continuously check for ...
1
vote
1answer
27 views

Batch echo command issue

It is inside the 2 pauses. I cannot understand why it is not working. Do mind the rest. It is a part of TGBF. As far as I can tell the text after the echo is an error, but I don't know why? Does it ...
3
votes
3answers
2k views

How can I start/stop a Windows Service through a Linux bash script?

I want to create a script that will be kicked off through an SSH server to start/stop a Windows service. The SSH user is part of the Administrator group. However, when I execute the script, I get an ...
0
votes
2answers
33 views

How to run multiple batch files with one master batch file

I have three bat files I would like to run, in three different directories: directory/bat1/bat1.bat directory/bat2/bat2.bat directory/bat3/bat3.bat I would like to use one master .bat to start all ...
0
votes
1answer
18 views

Unable to execute FOR loop from batch file

I am trying to execute the following command from inside a batch file: @echo off & for /f "delims=*" %A in ('dir /s /b') do echo %~fA %~zA >> "\path\to\output.txt" I found this command ...