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

31
votes
16answers
130k 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 ...
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. ...
22
votes
11answers
64k views

How to prevent the command prompt from closing after execution?

My problem is that in Windows, there are command line windows that close immediately after execution. To solve this, I want the default behavior to be that the window is kept open. Normally, this ...
8
votes
6answers
29k views

Enable/disable wireless interface in a bat file

Is there a way to enable/disable a wireless network interface via the command line (so I can put it in a bat file)? When I'm in the office I use a wired connection, but Windows still occasionally ...
64
votes
8answers
173k views

Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip files?

I have a batch file that outputs a text file. I thought it would be nice if I could zip it up too. This will be used in an uncontrolled environment, so I can't make assumptions about the presence of ...
24
votes
5answers
37k views

Variables in batch file not being set when inside IF?

I have two examples of very simple batch files: Assigning a value to a variable: @echo off set FOO=1 echo FOO: %FOO% pause echo on Which, as expected, results in: FOO: 1 Press any key to ...
6
votes
3answers
46k views

How to create a shortcut using a batch script? [duplicate]

How can I create a shortcut to the file D:\myfile.extension on the Desktop using a batch script?
19
votes
11answers
17k views

How do I batch change the date taken information in EXIF data?

I use F-Spot to manage my images. For one set of images, the dates somehow got messed up and they all are marked as September 1st 2007. I'd like to change the date taken information to a different ...
22
votes
9answers
56k views

How do I create a Windows Batch file that does not show the Command Prompt when executed?

I have installed a ruby gem called Redcar, which is launched from the command line. When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing ...
5
votes
5answers
4k views

How to join MP3 files? [duplicate]

Motivation I'm looking for a program that allows me to join a lot of mp3 files (an audio book) to a single large mp3 file. My mp3 player is able to remember the position inside a track, but it takes ...
9
votes
2answers
8k views

Programatically associate file extensions with application on Windows

I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally). I am ...
2
votes
3answers
3k views

Batch convert videos from MPG to AVI

I have a few hundred short MPEG files (each ~10 seconds) that I need to batch convert to AVI. What would be the best way to do this? I've tried using WinFF but the quality was very subpar.
3
votes
2answers
4k views

Batch “resize” JPEG images to a fixed file size

Changing quality of the JPEG when saving an image, changes the file size. For eg. I have the following image. Dimension: 243px x 53 px Quality:100% File Size:9.7kb Background: If I edit the ...
26
votes
10answers
22k views

Renaming many files in Mac OS X, batch processing

I used to rename file in Linux via a rename command: rename 's/old_pattern/new_pattern/g' *glob Is there something similar in Mac OS X (Snow Leopard)?
21
votes
7answers
61k views

Get current folder name by a DOS command?

Is it possible to get the current folder name (not current directory path) by using a DOS command? If so, how? The closest I got was this but it doesn't do it: for /f "delims=\" %%a in ("%CD%") do ...
9
votes
8answers
18k views

How to make 7-zip do a whole bunch of folders

I got a bunch of pictures that I had to crop into 800x600 pixels. That was easily done, but now I have to upload them so the family can see them all. Thing is, this is 500MB in pictures. I decided to ...
18
votes
9answers
35k views

Can a mapped network drive be reconnected from the command line?

On a daily basis I find myself in the Windows command prompt needing to access a network drive that is mapped but disconnected. I have yet to find a command that will reconnect this drive without ...
11
votes
3answers
8k views

Run a batch/cmd upon screensaver

Is there a way to run a .bat or .cmd when the screensaver starts? I've noticed some .exe can run if you rename them to .scr but is that it?
7
votes
5answers
32k views

How to copy a list of file names to text file?

How can I copy the names of files in a directory to a text file or to a clipboard?
6
votes
1answer
13k views

Set Permanent Environmental Variable in Windows XP

I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3? command SETX ...
5
votes
4answers
6k views

Batch convert TIFF images to PDF?

Are there any free utilities that will batch convert TIFF files to PDF? I've tried PDF printers like PrimoPDF & CutePDF, but these seem to require a GUI click to confirm each filename. What I'm ...
5
votes
1answer
24k views

Using Date and Times in a batch file to create a file name

I am running a program from a batch file, which when it is done performs an automatic backup of my MySQL database. I would like the batch file to create a different back up for each run, so I can ...
6
votes
4answers
5k views

how do you make a letter password generator in batch?

I'm having a hard time figuring out how to make a password generator with random letters in it. For example, ASWED-ASDWAD-EFEST. So far I can only make random numbers by using the code @echo off ...
3
votes
4answers
5k views

Which free software can I use to deskew scanned images

I've scanned about 100 documents, so I have a folder with 100 jpg images, but they are rotated by the angle up to 15 degrees. Is there any free simple to use software I can use to rotate them to the ...
2
votes
11answers
4k views

How to batch rename files copied from OSX to Windows with ':' in filenames?

This is really puzzling. I have lots of videos that were stored using Mac OS, and now I have to edit them on Windows XP. I copied files using HFSExplorer. Editing software refuses to open the files ...
1
vote
1answer
284 views

Can't save batch file shortly after running it on Windows 7

I'm working on a batch file in Windows 7 Ultimate. I'm using notepad++ with the runme extension. When I run the batch file and make some changes directly after that, I am not able to save the .bat ...
1
vote
3answers
13k views

Access denied, cmd move windows 7

I can't use this command in win 7 when want to move a directory if the destination exists. It says Access denied. Why hapens this? It worked in XP. move /y "%1" c:\mydir\ I can use robocopy, but ...
4
votes
3answers
12k views

Script to create folders in multiple directories using YYYYMMDD date as the folder name

At work every morning I have to create multiple file folders (using a YYYYMMDD date format as the file folder name) in different directories across our network for various departments. This is a real ...
0
votes
1answer
452 views

Script to Find Certain words and delete those lines in a file

EDITED THE QUESTION as i am open to different type of solutions unlike just batch previously I am on Windows & some suggested SED etc. So i am OK with these 3rd party standalone exe's using ...
28
votes
6answers
190k views

How do I make a batch file wait / sleep for some seconds?

I use a batch file to start up a few of the programs I need running in the background. Up until now, I had used the pause command to execute it after some of the other start-ups finished. I would ...
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.
16
votes
5answers
36k views

Using Gimp to batch convert images to another format in Windows

As implied by the title, does anybody know how to use the gimp-console-[version].exe program to batch convert images between formats (with default settings) in Windows ?
11
votes
1answer
66k 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 ...
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 ...
3
votes
5answers
4k views

Free batch image watermarking software [closed]

I'm looking for a simple yet effective software to watermark a lot of photos in batch. I have to apply a transparent png watermark image on 400 photos. The program have to place the watermark at a ...
2
votes
1answer
556 views

Is there a way to copy the file paths of ALL active windows' opened files? (for saving and restoring your Windows session across a restart)

There is a program I know of called Twinsplay - Professional Edition, which among its other functions, can 'session save' your current open files (i.e. user-opened files - whatever is actively ...
12
votes
4answers
11k views

How to delete files from a folder using a list of file names in windows?

i have a folder with 2K+ files in it, i need to delete around 200, i have a txt file with all the file names i need removed ordered in a list, how do i remove the specific files from the folder using ...
9
votes
4answers
6k views

Is there any way to get the windows cmd shell to expand wildcard paths?

Occasionally, the cmd shell's inability to expand wildcard paths can really be an inconvenience. I had to pass 100 files in a directory to a program, and couldn't type *.ext. Instead, I used mingw's ...
9
votes
3answers
3k views

How to disable the output of 7-Zip?

I use 7-Zip to compress files inside a batch file like this: ...\right_path\7z a output_file_name.zip file_to_be_compressed I got the following output: 7-Zip 4.65 Copyright (c) 1999-2009 Igor ...
3
votes
3answers
4k views

is there an escape for '&' character in the command prompt?

I am trying something like: set pwd = abc&123 echo password %pwd% I get the result as... '123' is not recognized as an internal or external command, operable program or batch file. password ...
3
votes
3answers
2k views

Can I get UAC prompt for user from batch file?

Can I get UAC prompt for user from batch file? For example I need put some keys to registry under CurrentControlSet from batch file by reg import path\to\my.reg PS. runas is not a solution as ...
3
votes
2answers
3k views

Delete duplicate files with Windows batch file

I have a program that automatically copies files to a directory, and if it creates a duplicate it will name it like so: file with duplicate.xxx file with duplicate - 1.xxx file with duplicate - 2.xxx ...
2
votes
2answers
7k views

Batch file to run multiple programs with delays [closed]

Well i am new to Batch things, so need some help. I understand the lowest level, but with more complicated things have problems. Thing that i need now is File that launches other files, but with ...
2
votes
1answer
255 views

How do I get an admin-mode script to run non-admin mode routines

I have an MSBuild script. It is required to run in administrative mode to complete the build. I have a couple of command line utilities that are required to run in user-mode (i.e. non-admins) that I ...
2
votes
1answer
1k views

Mount an ISO from the Command Line and Get its Drive Letter in Windows 8

I am making a batch script which mounts an ISO file and installs an app (VS 2012) from the mounted location like this: K:\Softwares\VS12.iso %DRIVE_LETTER%:\vs_ultimate.exe /passive /norestart But ...
1
vote
2answers
3k views

using FORFILES in batch to delete tmp and bak files older than a week

I am having issues making this syntax work correctly. What I would like to do is remove all tmp and bak files from the specified directory and all subdirectories if the modified date is older than 7 ...
1
vote
1answer
236 views

Adding key to registry

I would like to create a batch file, that will add registry key, not manually, but full automaticly by .BAT file. This link goes about adding everything but not the key. This link shows how to add ...
1
vote
4answers
2k views

Batch-Resizing images in OS X to a certain height

How can I resize a batch of images using Automator, so that all images will have a fixed height, e.g. I want to resize all images to be 60px high while width can be anything.
4
votes
5answers
9k views

Is it possible to eject a cd in a batch file on Windows XP?

I've seen a few executables/utilities that do it, and many forums that say it is not possible to do. But is there any DOS command that I can rely on in a typical XP installation?
3
votes
2answers
5k views

Error in batch file to copy folder: 'Invalid number of parameters'

I am making a batch file in Windows XP to copy my folders I need to another folder on my PC. I am getting an error. I get the error "Invalid number of parameters". xcopy /s/z D:\Documents and ...