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

-2
votes
1answer
25 views

Loop Counter not working

@echo off setlocal enableextensions enabledelayedexpansion set /a eng_aud_count=0 set /a eng_sub_count=0 For /f "tokens=1-9 usebackq delims=.:^)^( skip=2" %%A in ("MY text File") do ( set trck=%%B ...
1
vote
1answer
48 views

Batch file to automate a task

I run a job that creates 35 text files. The problem is I need to transmit these files after they are created, but before I can send them I need to go into each file and remove a space in order for the ...
0
votes
0answers
10 views

Special Characters in Folder Names Cause Delete by Batch File to Fail

I'm trying to delete empty folders via a batch file, in Windows. for /f "usebackq delims=" %%d in ("dir V:\Temp /ad/b/s | sort /R") do rd "%%d" fails on folders with special characters - ...
1
vote
0answers
5 views

Simulating errorlevel

My command takes long to run but I expect that it can finish with error and I want fail fast in the batch loop in this case. How do I produce the error level? I tried a batch file with exit 1. But, ...
-4
votes
0answers
37 views

Set command havs no effect inside IF [duplicate]

IF "%3"=="" ( set FOO=wtf echo FOO=%FOO% The FOO is empty in spite of assignment. What is up and how do I fix it? Well, there is a right title but I cannot read through the megatons of the ...
0
votes
1answer
20 views

Using batch to verify a process is running with WMIC

I am attempting to write a script that will check if a process is running (in my case a virtual machine) @echo off wmic process where name="VirtualBox.exe" | find "GitHubEnterprise" /c > tmpcount ...
1
vote
1answer
650 views

Windows CMD Batch, START, output redirection, but appending

i currently have issues with output redirection of cmd. I use "start" command to call another wayne.bat and want its output to be redirected. This works, but everytime i start my .bat (what happens ...
0
votes
3answers
86 views

Handbrake: How to batch convert videos including resize?

I am using the latest Handbrake v0.9.9. I would like to batch convert 200 video files from format 800x600 to 640x480. The problem is, if I add the videos to the Queue (clicking on >Source >Folder), ...
2
votes
4answers
4k views

Native windows cmd program to download a file

I'm struggling with the windows commandline for years. Is it possible to download a file over http(/https) with the programs that are shipped with windows by default? I know that I can download or ...
0
votes
0answers
12 views

Batch removal of watermark from a pdf using pdftk

Is there any script available or possible to remove a specific and a very large watermark using python. How to remove watermark from pdf using pdftk? I followed everything in the above link but i've ...
-2
votes
0answers
13 views

Multiple Directory Creation based on domain username and set file sharing script request

I need a script that will do the following. Create multiple directories labeled by domain usernames (I'm thinking pulling the usernames from AD and add the username to each command.). In a shared ...
0
votes
0answers
21 views

Batch replace non-ASCII characters in filenames

I'm looking for a shell script that will recursively replace non-ASCI characters with underscore or just remove them. The issue is that a drive with files, created on Linux, has to be used on ...
0
votes
0answers
18 views

Move files into specific folder in a folder directory if empty [on hold]

Batch file that can Move files (Files are all in a folder) into specific folder in a folder directory if empty. I want to make a batch file that can move files into a specific folder/directory if ...
0
votes
1answer
35 views

mklink in batch file keep returning insufisent permission

I made a code to execute an simbolic link between my Music folder and the music stored in my other hard drive @ECHO OFF SET /p bn=Band Name : md "%E:\Music\%bn%" SET /p dl=Album Name : mklink /d ...
3
votes
2answers
602 views

run .hta as adminstrator

Simple question how do you run a .hta file as an admin? When I try running runas /user:Grants-laptop\administrator computerinfo.htafrom command line I get this error: RUNAS ERROR: Unable to run - ...
0
votes
1answer
20 views

Batch script to only run command for 1 machine

I have a Windows GPO that runs a batch file startup script to disable NetBIOS. It normally looks like this: wmic nicconfig where (TcpipNetbiosOptions!=null and TcpipNetbiosOptions!=2) call ...
-1
votes
1answer
307 views

I need a batch file that will be able to restart an EXE when the EXE only uses 10% cpu usage

I have currently been using this. @echo off set serverName=Server Restarter title %serverName% :restart TIMEOUT /T 900 taskkill /F /IM ServerLauncher.exe /T goto restart Edit: Right now I have ...
1
vote
8answers
1k views

Add option to boot.ini with batch

I need to create a batch file that adds text to the last line in a boot.ini file, for example the last line of my boot.ini is : multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP ...
0
votes
0answers
9 views

Handle.exe creates Handle64.exe & hangs thereafter

On windows server 2008 R2 ,In a folder I have handle.exe along with psexec.exe and a batch file name test.bat with following content: psexec -s D:\data\handle.exe -p taskhost.exe > ...
0
votes
3answers
267 views

Batch file that run on a special day

How do I create a batch file that once clicked on, starts an .exe file if it is a Sunday? I do not want it to run the .exe file if it is on another day. If for example it is Friday I just want it to ...
2
votes
1answer
2k views

Trouble copying a folder from my computer to another network computer using ROBOCOPY

I am trying to write a batch file to copy all files and subfolders in a folder from my local machine to another machine on our network. I am trying to use the ROBOCOPY command and would like the ...
1
vote
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
2answers
2k views

Cut a part from a filename (windows batch)

I got files named like this: cam1(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam2(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam3(word1 word2 wordN) (24-04-2012 00-11-13).mpg Need to cut (word1 ...
0
votes
2answers
36 views

Batch program to move shortcut file

I'm writing a short batch program to move a few shortcuts. The problem is that Windows returns, "Can not find the file specified". I imagine this is because either it's considered a system file ...
0
votes
2answers
42 views

Batch file rename with random alphanumeric

I am looking to rename a bunch of images (all with .jpg extention) with random alphanumeric names. Example would be 08kDRH1s.jpg or 0FwzUc3.jpg. Doing some searching I did find a few batch scripts ...
0
votes
1answer
2k 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, ...
51
votes
12answers
25k views

How to supress “Terminate batch job (Y/N)” confirmation?

In cmd, when we press Ctrl+C we get the target application terminated but if the target application is called from a batch file, we get this "Terminate batch job (Y/N)" confirmation. I can never ...
0
votes
0answers
29 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 ...
2
votes
3answers
2k views

How to set to a variable, the result of a expression

I need to extract the date of a file, for then use this string as part of the name of a new file. I trying to solve this using the next commands: First I get the details of the file and redirect the ...
0
votes
3answers
54 views

windows command prompt change directory is now changing directory

I am trying to change directory from C drive to E drive. but the its not happening through following code. C:\>cd E:\Program files\wkhtmltopdf C:\>echo %cd% C:\ It says C:\ is current ...
0
votes
0answers
23 views

Automating SMTP Configuration

The following is an excerpt from a series of instructions I am following as a list of company procedures they would like me to automate. Is the following achievable through command line/batch, and if ...
2
votes
1answer
2k views

Windows 7 Batch file to Make Directory

I had a simple batch file I would use in Windows XP to create a set of specific subfolders inside a folder. I had it set up as a Right-Click context menu so that when I right-clicked on a folder ...
0
votes
1answer
22 views

need to copy folder with sub folder without answering prompt

I need to copy folder A to folder B and folder A is having subfolders. I have tried xcopy and copy both are stuck. C:\Users>xcopy sushantg\A\* sushantg\B /s /e /h /T Does sushantg\B specify a ...
0
votes
0answers
32 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
3answers
40 views

Create .bat to do a task at a certain time

I'd like to create a .bat file in Windows 8.1 that does a task (specifically, close a program/kill a process) at a certain time. I usually use the command line (which, I believe, works as a .bat ...
0
votes
0answers
8 views

Batch file to add specific string in a XML file and zip it to TAR afterwards

To start, I'm not a real hardcore programmer so bear with me. I searched the web for help and I got already some steps further to completion. What I'm missing, how to add a specific line after ...
0
votes
1answer
35 views

Batch file. If statements in if statements

I am trying to write this code: If %dropmode%==on ( If %drop% LEQ %potiondrop% ( set /a potion=%potion%+1 ) If %drop2% LEQ %potiondrop% ( set /a potion=%potion%+1 ) ) So, condition "if %drop2% LEQ ...
0
votes
1answer
20 views

Server 2012 Modifying sharing privileges on a folder via script

I have recently been employed by a small company as a software engineer. I am stepping a bit out of my element and doing a bit of IT work for them as needed as well. Currently I am going over some ...
22
votes
7answers
37k views

How to auto detect text file encoding?

There are many plain text files which were encoded in variant charsets. I want to convert them all to UTF-8, but before running iconv, I need to know its original encoding. Most browsers have an ...
3
votes
8answers
2k views

PDF to HTML - batch converter - most reliable and accurate free AND paid for software?

I'm look for either a free or paid-for (about 50$/40pounds) BATCH PDF to HTML converter to convert several PDF files at once. Needs to be able to handle vectored and bitmap images within the file, ...
0
votes
2answers
54 views

Using FORFILES to delete Folders older than 2 days

here is what i'm trying to do: Use the forfiles Command in a .cmd script to delete folders from a specified path that are older than e. g. 2 days on a win7 machine. Edit: The Situation is the ...
0
votes
0answers
24 views

Using a .bat file to pull a string from a text file within a zip folder

So, please bear with me. This is only the second batch file I've ever written and my first post anywhere on StackExchange. I'm writing a batch file that tells a remote server to run HP Array ...
0
votes
3answers
2k views

run a windows bat file on startup

I have a server access where I want to run some bat files in startup that can run automatically for any user. The problem is Other users are unable to run this file and it is required to be run as ...
0
votes
0answers
45 views

Managing windows updates via Batch file

I have an instance of windows server 2012 and I am trying to get an idea of how to accomplish the following requirements via a batch file. Turn Windows Update to manual Change Import Updates to the ...
0
votes
1answer
27 views

.bat file to create a Library with icon in Windows 7 and 8

Is it possible to create a .bat file that creates a Library with an icon in Windows 7 and 8. Of course this can be done by following the already created tutorials online like Change Your Windows 7 ...
0
votes
0answers
18 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 ...
1
vote
2answers
179 views

Batch: How to run a program when the computer is idle and stop when it's used?

I need to run a Windows batch (or any other command line software would do fine) that would run a program when the computer has been idle for a minute and stop it when it's used. I should obviously ...
10
votes
8answers
5k views

How to run commands as in a queue

I need to do a lot of copying of various files to various folders. I can add all my copy commands to a bash script and then run that, but then I must wait until it finishes if I want to add more ...
0
votes
0answers
17 views

“Print all” option causes unwanted cropping of .tiff files

I am printing multiple attachments using the "print all" option and .TIFF files are not printing fully, the edges are cut off. How do I prevent the "print all" option from doing this?
2
votes
1answer
12k views

Batch File - Delete Shortcut From ALLUSERS Desktop

In Vista/7, if I try to delete a shortcut using the following command -: del "%allusersprofile%\Desktop\MyShortcut.lnk" ...Windows sees this folder as empty and doesn't delete the file. The ...