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
2answers
972 views

How to batch print SWF files to PDF?

I am using windows 7 X64. I have installed Adobe Acrobat, so that I have a virtual PDF printer. I have also install the adobe flash player on the system. I open the SWF file using the flash player, ...
2
votes
5answers
4k views

Open Run… dialog from command

I would like to run the Run... dialog (the Win+R) from a batch command? There is an shotcut to it in C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools but that shotcut ...
0
votes
1answer
27 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
8 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 ...
1
vote
0answers
11 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 ...
0
votes
0answers
32 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 ...
0
votes
1answer
167 views

Batch file to get remote system information in a loop

Sorry about the title, I struggled to explain it in one line. I have a simple script which gets a remote systems status, and returns the line which contains the total memory, and outputs it to a ...
1
vote
0answers
23 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
2answers
16 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?
1
vote
1answer
17 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 ...
0
votes
2answers
96 views

Batch Image auto crop, apply fixed width, and maintain aspect ratio

I'm finding it hard to find a solution to what I'm trying to do. Simply put, the usage of these images is for an online store. The IrfanView batch processing using the autio crop borders basically ...
7
votes
4answers
13k 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 ...
17
votes
1answer
121k views

Batch file that runs cmd.exe, a command, and then stays open at prompt

I would like to make a batch file that: Opens cmd.exe Within that Command Prompt runs net use to display mapped share paths Leaves the window open so that I can run additional commands if I wish to ...
3
votes
1answer
107 views

Log ping and date isn't working [closed]

:START echo %date% %time% && ping -n 1 192.168.1.1 >> pingReport.txt 2>&1 echo %date% %time% && ping -n 1 192.168.1.2 >> pingReport.txt 2>&1 echo %date% ...
0
votes
0answers
28 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 ...
4
votes
6answers
17k views

Batch Convert OpenOffice (ODT) to MS Word (DOC) files?

I have a directory full of OpenOffice.org odt files that I'd like to batch-convert to doc files. Is there an easy way to do this? (bonus points if your answer uses OpenOffice and a Linux ...
1
vote
0answers
21 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 ...
0
votes
1answer
15 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%] ...
-1
votes
2answers
32 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
31 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" ...
1
vote
2answers
15 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 ...
3
votes
1answer
15 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
13 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
27 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 ...
-2
votes
0answers
28 views

Rename one filename by appending another filename in subfolders in windows [on hold]

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
31 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
1answer
27 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
161 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
36 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
19 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
603 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
50 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
33 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
32k 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
27 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
219k 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 ...
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
16 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
8 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
25 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
30 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 : ...
0
votes
2answers
39 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
28 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 ...