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

1
vote
2answers
1k views

Running Batch File As An Administrator…

I successfully created a batch file to flush my DNS. I have added a pause, I noticed in the title bar of the console window… It's not running as administrator. I've already tried a couple of ...
1
vote
1answer
8k 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
1k views

Batch copy multiple folders and their subfolders into a merge folder

I have a folder X:\Export that has several folders: X:\Export +---Export1 | \---various files … +---Export2 | \---… and subfolders +---Export3 | \---etc. \---etc. (names vary ...
-2
votes
1answer
910 views

How to remove subfolders keeping its content using batch file

Given a folder with several subdirectories, I want to move their contents to the top folder and remove the subdirectories. How can I do that on the Windows command line? E.g. I have a folder named ...
1
vote
2answers
2k views

How to batch truncate a file by a set amount of bytes?

I have ~300 files that need to be truncated (I need to remove a specified number of bytes from the beginning of the file). I can do it one by one using a hex file editor, but given the number of files ...
1
vote
0answers
136 views

generate cover art from files in folders batch [duplicate]

i have lots of flv files that i want to extract a screenshot from and save it as folder.jpg then convert the flv to mp3 and merge the cover art. i have this batch script working useing ffmpeg for ...
1
vote
1answer
402 views

Finding default gateway in an openvpn environment in windows

I need to find the default gateway in a openvpn scenario where the route output looks like that: IPv4 Route Table =========================================================================== Active ...
1
vote
1answer
2k views

How do I write a batch script to generate folders for each month, day and year?

How do I write a batch script to generate folders for each month, day and year based on user input?
3
votes
1answer
544 views

Delete files from one folder if a similarly named file does not exist in another folder

I need to delete files from folder A if a file with the same name but different file type does not exist in folder B. For example: FOLDER A file1.gif file2.gif file3.gif file4.gif file5.gif ...
3
votes
2answers
407 views

Kill program in a bat file

In a command file, startup.cmd, I have something like start "program.exe" I would like to do the following: if running, stop program.exe start program.exe I tried taskkill program.exe If ...
0
votes
1answer
384 views

Changing ati graphics setting into a batch file

I want to change my saturation level to zero and again to default but I can do it manually by going to ati catalyst center. Since, I want to do it regularly I need some batch file code or program ...
2
votes
1answer
2k 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 ...
9
votes
7answers
9k views

How to send a batch file by email

Trying to send a batch file as an email attachment, I get the following error: mx.google.com rejected your message to the following e-mail addresses: foo@googlemail.com mx.google.com ...
1
vote
1answer
500 views

How to batch rename files in Mac OS X?

I have the bunch of files that have names like MOV001.mpg, MOV002.mpg etc. They all have different date-time. How can I rename them so they turn into 2012 08 05 13 45 33 MOV001.mpg, 2012 09 02 23 ...
2
votes
2answers
4k views

VBScript Capture StdOut from ShellExecute

I am trying to run the following code snippet as part of a tool to gather and log some pertinent system diagnostics. The purpose of this snippet is to gather the result of running the command: ...
0
votes
3answers
74 views

why doesn't set test = whatever in windows?

Via a *.cmd script I do set "test = zzz" at the command line and then "echo %test%" and what's echo'd back to me isn't zzz, as I'd expect, but %test%. Any ideas?
0
votes
1answer
1k views

Is it possible to extend the timeout of taskkill.exe to kill a CPU hog?

Ok, I was goofing around on the command line, and I was trying to see if I could use an endless loop to cause a visual effect on the screen. Fooling around with ASCII Art. I started out using timeout ...
1
vote
4answers
4k views

Why does the command forfiles list files that are not a day old despite the command being otherwise?

The command I am executing is forfiles -p"C:\testdata" -m*.* -d-1 -c"cmd /c echo @PATH\@FILE" I have specified that I wish to only list files that are a day old however when I execute the statement, ...
37
votes
3answers
40k 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. ...
1
vote
2answers
805 views

batch command to store a folder name in a file in single line

I have a list of folders in a directory, i need to copy just all the folder name to a file and the file should be in a single line seperated by delims. can any help me with this in a batch file. ...
1
vote
3answers
6k views

Batch files to install Windows Service as Administrator

I'm trying to automate the install of a Windows Service for when I'm testing it locally. It is built in .NET... I'd usually open the Visual Studio Command Prompt as Administrator and then type the ...
1
vote
1answer
292 views

I need to take the first three letters of a filename and set it into a text file, in a certain fashion. How can I do this? [closed]

Okay, so I need to take the first three letters of a file from a list of files, and place this into a text file in a certain manner. I will provide examples below. Lets say that I have two file names ...
1
vote
4answers
707 views

Mac: Batch Scale Images same Aspect Ratio

I'm developing an iPhone application on a Mac, and have many, many images which I need to scale down. These images are of varying size, however, what I know is they must all be resized to 110x130, ...
6
votes
5answers
10k views

Runas command for user without password

I want to use the runas command in CMD and from Batch files to gain elevated permissions, but I don't have an admin password on my PC because it's my home computer and I'm the only user. Every time I ...
2
votes
1answer
620 views

Batch Scripting - Listing files with a specific amount of characters in file name

I'm creating a batch script for a class and I've hit a roadblock. I have to list all text files whose names are up to seven characters long on the entire C: drive - make the listing output in a wide ...
2
votes
3answers
404 views

Batch rename of several files [duplicate]

Possible Duplicate: How can I mass rename files from the command line or using a 3rd party tool? We have several files with filenames similar to below: ...
2
votes
1answer
678 views

copy list of video file names to text file along with their runtime?

How to copy a list of file names to text file? I am linking the above page because of its relevance to my question. Is there anything similar that can be done to output a 'plain' looking text file ...
6
votes
2answers
2k views

How to interrupt a running Batch file, execute a command in its environment, then continue?

I'm aware that I can interrupt a running batch file witch Crtl-C, and then continue the execution. However, is it possible to execute a command in the batch file's cmd environment while the batch is ...
0
votes
1answer
214 views

Looping through a batch file only if the response is “everything is okay”

I have a batch file that loops through the contents of a directory and compresses the files in the directory as follows; for %%a in (c:\data\*.*) do if "%%~xa" == "" "C:\Program Files\7-Zip\7za.exe" ...
1
vote
1answer
278 views

Could I centralize batch files more efficiently? [closed]

I am new to the world of batch scripting so please forgive what may appear as basic questions. I am learning as I get assigned different jobs and I am a huge proponent of automation where possible. I ...
3
votes
1answer
3k views

Edit windows service to log on as specific user using a batch script

I have several programs that are installed as a service. By default, after installation, the service runs as Local System Account. I can change it through services.msc, service properties to the ...
1
vote
1answer
764 views

pdftk: Compressing a bunch of PDFs en masse/in batch while keeping the filenames?

I have a rather simple problem. I have a lot of PDFs that I want to compress, all grouped by college class. I don't have the time or energy to manually run the compress command when I know I can ...
1
vote
2answers
844 views

Filter a CSV file using Windows batch file

I have a file with 12 columns separated by ? I need to export column number 12 (NetBIOS Name) and append the whole row to a CSV file. Skip the first line that is the column description. The first 4 ...
1
vote
0answers
440 views

Downloading a file from multiple FTP's via excel/command prompt

I have a huge list of ip's which point to a text file I need to download. There is about 500 text files and the text filename is the same, data.txt. My initial thought was to use a macro to get the ...
0
votes
1answer
732 views

Batch creation of previews of mp3 songs

I want to create snippets of mp3 songs using the first 30 seconds of each song. I want to apply the following actions on each mp3 song: Cut the first 30 seconds length of each song. Apply fade out ...
5
votes
1answer
5k views

Can a Windows batch file call another program without waiting for that program to finish?

I'm using Windows 7, and have a simple batch file to copy portable executables off my thumb drive to %TEMP%, and then start them. The goal is to prevent Windows from holding my thumbdrive hostage ...
0
votes
1answer
120 views

Batch command to run Visual Studio 2008?

I was just trying to run Visual Studio 2008 using a batch command. Start Notepad.exe opens Notepad for me. I am not sure how can I run Visual Studio 2008 the same way. Can anyone help me with this? ...
5
votes
1answer
902 views

How can I launch batch files from another batch file while piping their output and retaining the current working directory?

I have a batch file which runs as a scheduled task. For the sake of example lets call it alltasks.bat. It looks like the following: @ECHO OFF clearwebtemp.bat > clearwebtemp_out.txt ...
1
vote
1answer
64 views

Batch media file concatenation

Is there a command line tool for Windows 7 or Linux that given an m3u file, converts each file into one long file in a given format? I have looked at avconv but it seems like it does not have this ...
1
vote
1answer
245 views

Launching a scheduled task on a windows 7 VM on startup

I have a batch file I would like to run every time my Windows 7 VM restarts. I have created the batch file (and it functions as expected) as C:\example.bat. I have also setup a task in Task Scheduler ...
1
vote
2answers
369 views

Batch image program to replace 2 colors?

I have a lot of .png images, and I want to replace a color to another color.. Is there a batch program to do that? I'm on Windows 7
14
votes
4answers
8k 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 ...
1
vote
2answers
261 views

Calling .bat from bash terminates loop

I'm having a problem that is extremely odd to me. I have a loop that reads a file line by line that looks something like this: while read line; do echo "Beginning of loop" ## Call to function ...
2
votes
1answer
2k views

Windows - ftp.exe - Sending Multiple Files

How do you send multiple files using ftp.exe? How do you send multiple files of the same file extension? I tried using "mput", as the help for ftp.exe says that command is for sending multiple ...
0
votes
1answer
2k views

Extracting last command-line parameter of batch file

I have to modify a batch file (written by a former employee) that uses a for %%f in (%*) do ( ... ) loop to operate on each command-line parameter. The new requirement is that a directory name will be ...
0
votes
1answer
365 views

Photoshop batch process pausing on every action

I recently upgraded to Photoshop CS6 and imported my actions from my previous version. I am trying to run a batch script to automate an action. Every step seems to require a input click. In other ...
2
votes
2answers
6k views

How to keep the console opened after executing a batch file?

When I run Apache Tomcat startup.bat file manually the cmd console stays open, when I run the same in java code, the console closes. (I am trying to automate some processes in my project). For Windows ...
0
votes
1answer
203 views

Start multiple console applications in a single window group?

I'm using a .cmd-file to start 5 instances of a service bus (using the "start" command in cmd). However, they are not the same executable. Is there any way to group these windows into one taskbar ...
6
votes
3answers
62k 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?
2
votes
3answers
7k views

How do you quickly remove underscores from folder names?

What is the easiest and fastest way to remove underscores from folder names in Windows? Running a Google search I found a VB script that automatically removes all underscores from file names in the ...