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.

learn more… | top users | synonyms

0
votes
1answer
20 views

Use existing explorer.exe instance when calling from batch file - Windows 7

In my batch file, I am calling a new Windows file explorer at a specific location by using the following: echo off explorer.exe "C:/Users" The user then navigates to other folders as needed. Then, ...
1
vote
2answers
4k views

How to create a desktop shortcut from a batch file

I know there are many posts on this issue but there is a minor twist to what I need to do. I can figure out how to create a shortcut with an argument like this: "C:\Program Files\My App\App.exe" /s ...
0
votes
1answer
37 views

Delete “unidentified” carriage-return char from a text file

I have a text file containing a strange "carriage return" char. If I open the file with Notepad I can't see the new line. If I open the file with Wordpad I can see the new line. I uploaded an ...
0
votes
2answers
30 views

how to run a batch recursively

I have a parent folder (BIG_Folder), which contains many subfoldes (folder1, folder2, folder3 ...) in each subfolder a batch file exists, it is always the same (x.bat). I want to run all bats, ...
-4
votes
0answers
43 views

How to create Windows batch file to perform these tasks? [on hold]

I need to create a batch file that should do the following: Run another batch file in administrator mode (Run as administrator) Once above file is run, delete files/folders from certain directory ...
1
vote
1answer
2k views

Run an ftp batch file from within a batch file

I have a scheduled task which executes the commands in my file ftp.txt every day. The file can be seen below, it connects via ftp to my site and puts 3 XML files on to my web server. command: ftp ...
0
votes
1answer
117 views

Batch file with (Java invocation) wildcard expansion works on one Win 7 machine, fails on another

I'm using a Windows batch file to launch a Java program, using wildcard expansion to set a load of JAR files on the classpath similar to the below: java -cp "MyLibFolder\*" com.stupid.StupidProgram ...
13
votes
4answers
14k views

How to batch combine JPEG's from folders into PDF's

I have a about 500 folders with images inside. Is there a way I could batch convert this so that I get .pdf files that contain all images inside as pages? EDIT: There should be 500 PDF's created, ...
1
vote
1answer
6k views

Batch file script for Enable & disable the “use automatic Configuration Script”

My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set ...
1
vote
1answer
32 views

Looking to rename a batch of cab files to lowercase as well as adding their SHA1 Hash

I need a batch script to rename all the files in a folder their lowercase equivalent, with their SHA1 hash added at the end after an underscore. Example: I have a file called: ...
0
votes
2answers
58 views

Windows 7 dos batch file to open file read second or third line and rename file to found text [closed]

I have about two thousand text files I need to rename, but I need to open the file find the line starting with the letter "O", extract the "O" and the next five characters, close the file, then rename ...
2
votes
0answers
18 views

Slurm jobs are pending, but resources are available

I use SLURM as a job scheduler and queue for a small cluster (single node with 64 cores). To submit a batch job I use: > sbatch run.sh Where run.sh looks like: #! /bin/bash #SBATCH --ntasks=4 ...
34
votes
3answers
31k views

How does the Windows RENAME command interpret wildcards?

How does the Windows RENAME (REN) command interpret wildcards? The built in HELP facility is of no help - it doesn't address wildcards at all. The Microsoft technet XP online help isn't much better. ...
2
votes
1answer
26 views

I have a batch file that echos multiple lines. I would like to output it into the file but the file only shows 1 line

This is what I have: SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION @echo off set num=0 set "suffix=" for /f "delims=" %%s in ('dir /b /a-d /o:gen') do ( if /i "%%~xs" equ "!suffix!" ( set ...
3
votes
2answers
288 views

How to find the PCs name in a batch script?

How would I find the name of the PC running my batch program on it? I would like to find the name of a PC that is running my batch program and be able to store it as a variable. Any help?
1
vote
2answers
257 views

Rename photos, jpg ordering based on raw times

I have a large set of photos taken with both JPG and RAW which are named in wrong order since the camera counter reset after about half of them. While going through the JPG files I turned some of them ...
-1
votes
1answer
39 views

Wrong environment Settings invoked in Commands

Getting wrong and extra pathnames in error messages using "For /D", "dir" and "if exist" commands when running the non-Powershell batch code to elevate UAC privileges code here. This has been noted at ...
3
votes
2answers
2k views

Batch convert all html files in a directory into pdf files in windows?

I see one solution so far: http://www.htmldoc.org/ Are there any more out there which are suggested?
0
votes
1answer
38 views

Find IP with Batch

I need to use a command of some sort to find the external ip of the user of my batch file. I have tried many methods but I need the batch file to recognise the ip as a variable of some sort so it can ...
0
votes
1answer
69 views

Extract multiple strings between two words in a file

I have a text file made this way: hjkhkhkjhkh<start:"xxxxxxxxxxxx:"alt>asdsadasd<start:"yyyyyyyyyyyyyy:"alt>gfhfg ...
1
vote
0answers
23 views

The Command “copy /b Source+,,” does not work in a Batch Script

I'd like to update the timestamp (Modified Date) of a file in a batch script by using the following command "copy /b Source+,," but it does not work. I tried the same command through command line ...
-1
votes
1answer
30 views

Script for a batch file that runs a program for a specific period of time

I want a script for a batch file that makes a program run every 10 minutes for 5 seconds each time. In these 5 seconds, the program must be running on top of all the other windows, but out of focus so ...
0
votes
1answer
20 views

pipe + one digit number does not echo

I have a script that reads the row count of file and sets this number in variable ROWCOUNT. So to add footer like this "F|5" to file file.txt with ROWCOUNT minus header I do the subtraction and with ...
0
votes
1answer
4k views

How to make PuTTY's font automatically change color (while connected to a Linux server) as I did with Windows cmd.exe using a background batch script?

I was able to create a Windows Command Prompt that automatically changes its text color on a white background every ~1.5 seconds, thanks to the help of @dbenham and @Woody. I also use PuTTY every day, ...
15
votes
11answers
59k 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.
0
votes
1answer
24 views

Cannot use PStool for more than 7 PCs over LAN Network

Below is the batch file command I am currently using to shutdown the remote computers through LAN Network. Here is what it does. I have specified the remote computers IP address in text file named ...
0
votes
1answer
34 views

batch file to run two application and when 1st app closed, other will be close too

Its a game called SubwaySurfer for pc, to run it through your keyboard we need to set autohotkey, what I need is when user click to play a game the autohotkey file will be run too, and when the game ...
2
votes
1answer
46 views

Batch Directory Name is too Long

This question was posed as an answer to this thread where running FOR loops in batch with UAC elevation code generates voluminous errors involving non-existent directories. Here is a screenshot of ...
0
votes
0answers
18 views

Rename files using cmd and allow duplicates file name

I have my batch file which consists of the following command. REN "H:\April2012\A04\mr_sudheendra_holla_vaderhobli.pdf.1335780379203.ver1" "mr_sudheendra_holla_vaderhobli.pdf" But if duplicate ...
1
vote
1answer
248 views

Batch copy gives errors, xcopy works fine

I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon ...
0
votes
1answer
18 views

Variable and Conditions with Batch Windows

I would like to make a batch. The goal is simple : For all files with DSW xtension If my filename contains VU1 so variable1=2 and variable2=2 If my filename contains VU2 so variable1=20 and ...
0
votes
0answers
22 views

How can I add loopback adapters with the command line and configure them with the command line?

What is the command line to add a loopback adapter with IP 127.0.0.2 on Windows 8.1? I need to add 65,000 ip's to my local machine for network stress tests (connections from many different IP's) for ...
0
votes
1answer
22 views

How to rename a file to include remote machine's hostname via batch script?

I have a .bat file that copies a file from one computer to another. During the transfer I would like to rename the file to include the hostname of the computer from which the file originated. The ...
0
votes
0answers
18 views

Batch conditions and variable

I have a question about variable and batch windows. The main goal is : I have files in directory (pattern 0? with ? a number between 0 and 9). First I create a %%nf.bat (filename of each files) ...
1
vote
1answer
33 views

Preventing my pc from being shut down remotely

In my college, we use Microsoft Server 2008, and each student has their own account. In my class, students discovered that they can remotely shut down each other's PCs using cmd (the fact that we ...
3
votes
6answers
8k views

Running a batch file on logoff

I have a batch file that makes a directory on H:\ and copies all of my CS work from I:\ to H:\ ( our I:\ drive isn't always available ). Is there a way to possibly run this batch file on logoff so ...
2
votes
1answer
7 views

Does anyone have a Windows “at /every:” example to explain how to setup a batch file to run the first sunday of every month?

This is the one I have to run first day of the month, but I need to run it the first sunday of every month. at 13:00 /every:1 D:\DBMaintenance\MySc.bat Thanks
0
votes
2answers
15 views

Powershell - Start Process on Different Drive from Batch CMD

Problem: From the CMD or Batchfile, calling powershell and starting a process from a different drive or the -FilePath is failing.
0
votes
1answer
25 views

Batch file that sets a variable equal to the drive letter of first removable disk found

I want to write a batch file such that when I run it in cmd, it sets a new variable equal to the drive letter of my usb flash drive (if, of course, it's the only storage device of that type). Assume ...
0
votes
2answers
85 views

Batch process: Subtraction of images

I have numerous images from a directory that needs to be subtracted to another image(another directory) and I don't know how to do it automatically in batch process. Any idea? The following are the ...
0
votes
1answer
960 views

windows 7 batch file change desktop background

i want to write a batch file that changes the desktop background this is what i have reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d c:\j2Global\backgroundDefault.jpg reg ...
3
votes
2answers
177 views

The Directory name is too long in batch

I already asked the question in stack overflow, but did not get any answer from anyone. So i am asking the same question here also. I am trying make a program which will calculate size of all folder ...
0
votes
1answer
19 views

Storing info from wmic as variables in command prompt (Windows 7)

I'm trying to write a batch file that copies a folder from my flash drive to the desktop. I want the batch file to achieve this on any pc in my college. the command wmic logicaldisk get ...
1
vote
0answers
13 views

Batch metadata and text extraction of pdf files

I have a set of PDF files, all of which contain text. However, some of these files were somehow not created properly; the selectable text is not searchable or convertible to plain text (the resulting ...
0
votes
1answer
29 views

Windows batch equivalent of “command” in linux bash

In linux bash there's a command command which can execute the "real" command even if you have a function name or a script filename that is named equal to that command. function ping(){ echo do ...
0
votes
2answers
1k views

Using sqlplus as tnsping alternative

Is it possible to use sqlplus as an alternative for tnsping since tnsping wasn't installed with the oracle setup. I simply want to check via batch script, whether the definitions from the tnsnames.ora ...
0
votes
0answers
35 views

Batch file unable to run commands after launching putty

I am writing a batch file abc.bat which is used to launch putty. I want the .bat file to go to a particular folder (in PuTTY), source it in csh and go to a particular path on that server. I wrote the ...
1
vote
1answer
58 views

Running a same batch file again every 30 minutes

I have a batch file which is just a simple batch file. You can take any example. How can I keep the batch file running in a loop from start to end again and again, till the specified time is met or ...
0
votes
2answers
547 views

How can I create a batch job (.bat) that zip a folder?

From 7zip I've downloaded their command line tool 7za.exe, and I have to following script: echo off cls set zip ="C:\7za.exe" set filename="%date%.backup.zip" set pathtobackup="C:\MyDocs" %zip% ...
8
votes
4answers
16k views

Windows script to copy some text to the clipboard?

I am using an application that requires several attempts to log in (because of overloaded servers). This app has no "remember my password" feature. Therefore, I would like to make a script ...