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
4k 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 ...
0
votes
1answer
91 views

windows net user command to work with network service

This might be a trivial question but I was wondering if it was possible to use the net user command in windows to give back useful information on the "NT Authority\Network Service" user. I have tried ...
1
vote
2answers
5k 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 ...
1
vote
2answers
538 views

Creating a drag and drop batch file to split an MP3 using ffmpeg

I've got a folder full of FFMPEG batch files that I've written to do various conversion tasks. These allow me to drag and drop a bunch of files and do a conversion - for example, decompressing MP3 to ...
0
votes
2answers
53 views

Create folder from specific multiple files, and then move specific multiple files into it

I have some files 07-01.jpg 07-02.jpg until 07-48.jpg 37-01.jpg 37-02.jpg 37-03.jpg until37-48.jpg I want to create folder 07, 08.... ,37 and then move multiple files 07-01.jpg, 07-02.jpg, ...
1
vote
1answer
223 views

How to “reuse” a regex find and replace in Vim

I have a plain text file with entries as firstAuthorLastName_titleFirstWord_YYYY that I change to firstAuthorLastNameYYYYtitleFirstWord with the following s// command in Vim.^[1] ...
4
votes
2answers
6k views

setting ERRORLEVEL to 0

What I have is a batch file that is a wrapper around an installer. This batch file checks the error level returned by the installer and prints accordingly. I noticed that if I execute set ...
1
vote
1answer
675 views

Need to script the installation of some MSIs and a few registry edits

I'm periodically required to update a whole bunch of browser plugins and other programs. I figured I might as well automate the process with a batch script. I found the MSI's for Reader, Java, Flash, ...
2
votes
1answer
850 views

ssh and execute interactive command

I currently have a process where i login to a machine, need to ssh to another machine and then run a command for an interactive job (on a queue-ing system). Is there a way to do this all in one shot? ...
0
votes
3answers
1k views

Batch repacking zip archives into 7z

I have many zip archive files that I would like to re-pack into 7z archive format, as that would save me a lot of space. How do I batch-repack those files on a Windows 7 computer? I tried doing this ...
1
vote
1answer
611 views

Windows XP, Can run .jar from cmd prompt, but batch file errors on “Cannot access jar file”

I am trying to create a simple batch file to start my java application from. It seems that it will not let me access the .jar file from a batch file. Is there a special syntax for file permissions I ...
1
vote
1answer
415 views

inkscape not working from command prompt

I was looking at the answer to the question (converting EPS to PDF) where they suggested using Inkscape to convert EPS to PDF images. I need the exact same thing. Using the GUI, it works like a charm. ...
0
votes
1answer
519 views

Using command prompt batch files to automatically rename duplicate files

I have batch file that generates one file *.txt that I use for review some details about installation process of a software, all good BUT how can I generate a new *.txt file on the same location with ...
2
votes
1answer
310 views

Custom Windows Configuration Batch File

I'd like to configure myself a one-click configuration windows script. However, I really don't know where to search for the lines to edit in the registry. I've found some things (such as UAC ...
1
vote
1answer
1k views

Batch conversion for images from command line on Windows

I have a script based on GIMP batch tutorial: (define (batch-colorize pattern hue saturation lightness) ...
2
votes
1answer
277 views

How do I copy a file to a destination with a wildcard?

For example, I would like to copy a shortcut.lnk to all of my individual users in windows xp. Therefore I want to do something like this: echo | f xcopy \\server\networkpath\shortcut.lnk ...
0
votes
1answer
3k views

Add text to beginning and end of each line using batch/cmd

What I'd like to achieve in the end is to generate a text file that lists all *.txt files in the current directory with the path appended to the beginning of the filenames, and some other string after ...
0
votes
2answers
67 views

Creating the same folder in all sub-directories of a folder

I am having difficulty getting the (simplified) batch-file below to work. It creates the a specific folder in all sub-directories of the specified directory. @echo off setlocal set "location=c:\test" ...
0
votes
1answer
304 views

How to batch extract from archive using tar to directories

I m trying to extract files contained within a directory in a tar.gz file. The extract I m using is tar zxvf foo.tar.gz. It extracts the files from the archive but removes them from the directory they ...
1
vote
3answers
5k views

Batch File Check Directory exists in x64 and/or x86

I need to be able to run this batch fine on both x86 and x64 machines to check if a program has been installed correctly . We have an app that installs in x86 in the standard program files directory, ...
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 ...
0
votes
1answer
116 views

Alter txt file contents with BAT script

I need to take a text files contents and sort them into a column and re-save the file. The contents of the file look like this, all in one string.... ...
1
vote
1answer
313 views

Loop through text file for names in text then pull the file associated with that name (same name) from a folder

Okay, I know this sounds odd but here is what I am trying to do. Find the boot class file of a phone via shell command. The boot class file is a list of APKs the phone needs to perform certainn ...
1
vote
1answer
373 views

Make a bat file want for a program to be running then launch another one

I am currently trying to create a batch file that launches some programs for me. This could easily be done with the command "start" but the last program it runs only works if the first one's window is ...
0
votes
1answer
2k views

How do I use a batch file to recursively replace a string in files?

In my SQL files, I have hardcoded the C:\ directory into all the output file paths, but there are times where the client wants to have the outputs stored on E:\, for example. How do I go about doing ...
1
vote
1answer
1k views

Deny running batch files

How can I deny users of my network to run any batch files in their user level? I want it to return them an access denied message OR delete the script entirely. Any ideas?
1
vote
2answers
3k views

Is there a way to parse arguments into a batch script

I have found a very useful script here that will parse in arguments to a batch file and process them as follows: BatchFile.btm /a /b:22 /longopt Parm1 Parm2 /quotedArg:"long quoted arg" - OPTION_a ...
0
votes
1answer
700 views

How to create batch file that delete files by words at the end of file name (using a list of words)?

I have a directory with thousands of html files scattered across several subdirectories. I need to delete all files matching any one of many criteria. All criteria are similar by kind. The file names ...
0
votes
1answer
320 views

VB or Batch script to get the MAC address of remote windows CE devices

I'm trying to write a script in vb to open a telnet session to a remote windows CE7 device from a Windows 7 laptop to get the output from ipconfig /all to a text file, then append the contents of that ...
1
vote
1answer
252 views

Getting batch file to auto rename input file

I'm trying to create a batch file to process videos and rename the output file automatically. I've got this so far: @ECHO OFF d:\audio\ffmpeg.exe -i "%~1" -vcodec copy -acodec libvo_aacenc -af ...
1
vote
3answers
1k views

How to batch unlock multiple PDFs which have same known password?

I have several PDF files each with the same password that I know. What tool or method could batch unlock them and provide a copy of each of the PDFs as an unlocked version? There's CutePDF - could I ...
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
73 views

Program exepects to point to a *.exe that is running under Windows XP Mode

I have a program (Xilinx ISE 10.1) that I have to use [it is the last ISE which supported the Virtex-2, which one of our designs uses]. I'm using Active-HDL, which expects a *.exe file for ISE to ...
0
votes
1answer
310 views

How to create ZIPs with the content of every folder [duplicate]

I have several folders and I need to compress the content of each folder in a separate ZIP file. However, every ZIP should only contain the content of each folder and not the folder itself. The ...
2
votes
1answer
156 views

How can I apply cat (UNIX) command individually, to all files in a folder?

Here's the situation: My file A.csv needs to be concatenated individually with all the other *.csv's in the folder and each of the outputs needs to have the same name as the particular *.csv. How ...
1
vote
2answers
743 views

Script to configure Windows 7 New build

I find myself installing Windows 7 on a regular basis and when I've installed the OS, I normally do the following: Enable the 'Run' command in the start menu Disable peek Change power button ...
0
votes
2answers
438 views

Rename and reverse the numbering of a list of files

In Linux, preferably using bash, what would be the best way to achieve the goal below? Say I have a series of numbered files 001.png, 002.png, 003.png What is the best way to move/rename them to ...
0
votes
1answer
219 views

Windows 8 and visual studio 2012 post-builds are denied macros and batches

This been killing me... Since I've changed to Windows 8 I cannot run post build events batch or macros. I've been trying to do xcopy and run some bat files (with xcopy) without success. They always ...
0
votes
1answer
998 views

Sublime text 2 build system

I want to build a file using Sublime Text 2, and then do a simple copy. I managed to do the first thing using a build system, and I think it has to be possible to do the copy with the build system ...
2
votes
3answers
1k views

FTP batch file works from command line but not scheduled task

I want a windows scheduled task to execute an ftp batch file which will upload some files to my server. If i run the argument below from the command line then it executes successfully. ftp -i ...
3
votes
2answers
5k views

How to extract attachments from EML files with Windows command line?

I have hundreds of EML files which are single emails with attachments. I would like to use scripting to get the attachments, that's why I'm looking for a way to extract any attachment from a single ...
1
vote
2answers
256 views

Batch file to move files to directories in round-robin fashion

I am trying to have a batch file that moves ".doc" files to a folder. The trick is that i have three user folders named Mark, Luke and John that I want these files to go to. Example, aa.doc is in a ...
0
votes
3answers
987 views

Search .csv from within a batch file

I am looking to create a batch file that will search a .csv for a specific number, and then use the 2nd value in the csv as the input back into the batch file. Example: csv name= IP.csv .csv ...
0
votes
1answer
629 views

How to recursively zip utf-8 files and folders from a batch file?

I have a folder named "Attachments2". I'm working in windows 7 and am using zip.exe downloaded from cygwin to zip this folder. In this folder there are folders and files which have Hebrew characters ...
1
vote
3answers
1k views

Converting Date Format with Batch file

I have a text file containing many date entries of the following format: YYYY/MM/DD How would you convert that to the following format? YYYY-MM-DD This file contain many date entries, so it ...
0
votes
1answer
144 views

Move only certain files with cmd

I have many files, e.g. 1000, with different names that I have a list of. If I want to move certain files (suppose 400) to any directory, how can I do this? The problem is the files have no ...
0
votes
2answers
251 views

How to start applications automatically when Windows starts with a time window

I would like to ask if there is any way of starting applications automatically when windows XP boots up, but approximately 1 minute after each other. THe problem we are encountering is that we use ...
0
votes
1answer
3k views

Change a drive letter from Command Prompt or batch script in Windows 8?

I have an external hard drive that I connect often to my computer. At some point it was assigned letter G: and based on that my other software works. Nowadays, suddenly it gets letter F: Is there ...
0
votes
1answer
5k views

Batch file gives “the system cannot find the file specified” but commands run fine in cmd

I'm trying to run a simple batch file: @echo off <-- don't print this line or any of the preceeding lines to the console window. pushd "K:\" <-- in the quoted directory for %%j in (*) ...
-2
votes
1answer
97 views

how to write a script that opens cmd and runs a command? [closed]

I would like to write a script that opens the cmd and runs some command that I wrote. How can I do it? and when I save the file - the ending is .txt? i'm not familiar with it so any help would be ...