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

7
votes
5answers
27k 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?
0
votes
0answers
6 views

Server 2012 - Scheduled Tasks - “You do not have permission to access this computer”

I am on host_server, trying to schedule a task on remote_server. Both servers are Windows Server 2012 R2 and belong to WORKGROUP Steps Open Task Scheduler Right-click Task Scheduler and select ...
14
votes
11answers
53k 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
3answers
702 views

Batch file to replace “.” with “-”

I need to preserve the file extensions and it needs to work through the subfolders. For example: "File.name.ext" should become "File-name.ext" I am a completely ignorant regarding shell script so ...
2
votes
3answers
92 views

How to batch convert multi-page PDF into individual jpg files

I found these posts on converting a PDF to JPG using ImageMagick. However, I have a 12 page PDF I want to convert into 12 separate high quality jpg files. Looking for the least tedious way possible. ...
0
votes
1answer
29 views

Parent process details from the batch script - find out what called the batch script

We have a batch file which is calling php scipts. Php script load some data files to our system. I cannot understand what is starting that batch file in the middle of the night. I cannot find any ...
2
votes
6answers
5k views

How to list all files on all hard drives with output in MS-DOS batch?

How can I list all files (including system and hidden) on all hard drives (not removable drives)? I think in something like a: dir -a -h *.* /s > file.txt but this is for the specific drive ...
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 ...
3
votes
3answers
2k views

́╗┐' is not recognized as an internal or external command

When executing certain files (mainly batch) using PsExec I get these weird ́╗┐' symbols before my command. My initial thought was, that I were using wrong encoding, but after checking, I realized that ...
7
votes
1answer
67 views

How do I batch-downsize images on linux, while keeping small images small?

I have a whole lot of photos and it's time to clean up the mess and free some disk space. I know mogrify is great to batch-resize things down. The problem is, in some directories I have small images ...
-1
votes
1answer
15 views

I want execute in bacth via commandline REG IMPORT

When I try to execute this command: REG IMPORT myreg.reg I get access denied message, because I'm not administrator. However I don't want to open command line using run as administrator in visual ...
0
votes
2answers
19 views

Run other cmd in bat like from it's own path

I need to run bat(fix.bat) in cmd batch file (let's say sample.cmd on c:) The problem is that despite of using: start /WAIT cmd.exe /C D:\dev\sys\fix.bat fix.bat runs like from parent command ...
0
votes
0answers
13 views

Want to write batch script on the basis of system date and exit code

This is MY first question in this forum, Hope any one of you can fix the issue.. I have one log file containing the pattern as below "abcd.job" (abcd.bat) Started 27/8/2014 5:00:00 AM ...
0
votes
4answers
36 views

dir folders at a certain folder depth in a batch file

I want, with a batch file, to be able to search and display the files in a bunch of folders called "error" located in a bunch of different places. The error folder is always at the same folder depth ...
0
votes
1answer
23 views

Batch file to read a file and create a JSON?

I have a text file with some dozens of entries in the following format: code: SETX id: 1 msg: Message for setx code: SETY id: 2 msg: Message for sety msg_ja: Japanese message for sety As you can ...
-1
votes
1answer
33 views

'sqlcmd' is not recognized as an internal or external command

(I know this isn't really meant for here, but I can't ask questios on Stack Exchange) I'm creating a batch file and I get this error message: 'sqlcmd' is not recognized as an internal or external ...
0
votes
1answer
35 views

.bat file to rename files (not bulk)

I take pictures of airplanes. When i put them on the computer they are named DCS_5678 (or anotrher number :p ) The way i catalogue my pictures is by renaming them as followed: ...
-1
votes
0answers
16 views

Batch scanning software to save in specific location [on hold]

Does anyone know of any software that can do all of: Batch scan from a scanner Split to the scanned document based on bar-code separator pages Save the file into a predefined location based on the ...
-1
votes
0answers
15 views

Python coded batch files

I know this is more suited to Stack Overflow but I'm not allowed to ask any questions there so here seemed like the next best thing. I'm creating a batch file for the first time and don't understand ...
1
vote
2answers
267 views

How do I computationally slice an audio file into small samples?

I need to cut audio files into small samples of even length. What I need is basically a batch processor for audio that does it and names the slices numerically. I'm using OSX and have found Audio ...
0
votes
1answer
879 views

batch move for different file types to different folder name

I have files containing in C:\foldername1\Files\soandso1.mkv C:\foldername2\Files\soandso2.mp4 C:\foldername3\Files\soandso3.avi I want to move the .mkv, .mp4, and .avi back to it's parent folder, ...
0
votes
1answer
55 views

Batch Script to Trim lines in text to first 30 or 50 characters only

I am now new to scripts but i find it really difficult understanding "for" command (especially with that tokens and delimiters etc) . Saying so, i think that for command can be used to do what i am ...
1
vote
1answer
79 views

Dir and Findstr commands taking a long time to complete in Batch File

dir %DRIVE_NAME%: /S /C /A-D /Q /T:C | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >> file.info I am using above command to list all information in ...
0
votes
0answers
17 views

In windows, filter and delete image based on dimension(or any search filters for that matter)

In windows explorer, I can filter a folder based on the dimension criteria, say: width:<800 height:<600 (so that I filter small images) height:>2000 (so that I filter portraits) and then delete ...
0
votes
1answer
107 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 ...
1
vote
1answer
2k views

Batch File, PING, errorlevel and > null what do they do?

This seems like a really easy question (running Windows 7). But I have looked for the answer and couldn't find anything at Microsoft's sites (XP PING & Everything else PING) or from a bunch of ...
20
votes
11answers
54k 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 ...
-1
votes
0answers
21 views

Need Text Line Editing Commands for windows [on hold]

I asked something similar to be do with batch but it didn't work out well (as i need batch only solution). Some suggested SED , TR etc. So i hope to get a solution with these 3rd party exe's using ...
-2
votes
1answer
21 views

How to print specific page of each of several PDFs in a folder

I have to print the second page of several PDFs. They are all on the same networked hard drive, but it's bogging down everything so badly. I was hoping there would be a way to accomplish this, perhaps ...
0
votes
0answers
7 views

Windows 7 mountvol and task scheduler

In Windows 7, I have a Task-Scheduler job which run Backup4All, to do a backup of my data. It has provision to run a "pre"-backup batch file, and a "post"-backup batch file, which I have taken ...
0
votes
0answers
27 views

SOLVED: runas /savecred error 1311 no logon server

Computer: Windows 8.1 Pro on company domain I have a program that needs to be run occasionally for testing purposes, and is installed and uninstalled regularly. I am not a domain administrator, and ...
0
votes
1answer
33 views

Windows Batch - Move files to folder parent & Remove empty subfolders

I found several such questions and tried to adapt the answers to my needs but no luck so far. Im trying to create two context menu entries in Windows 7 that would: Move all files from ...
1
vote
0answers
35 views

.bat script doesn't work by using window scheduler

i created a .bat script to perform daily folder compression. it is working fine when i double click the .bat file. However, it doesnt work when i include it in window scheduler. Below is the script: ...
1
vote
3answers
3k views

How to optionally copy and rename a file in Windows?

Basically, in an automated batch file, I want to copy and rename a file if the destination file is missing or older. There are several variants, which do not quite work: copy /Y c:\source\a.file ...
0
votes
1answer
22 views

Assigning a Windows environment variable to a batch variable?

I can't seem to assign an environment variable to another one inside a batch script. For example, this will work: set varA=C:\this\is\a\directory and I can happily use find /I "MyString" %varA% ...
0
votes
0answers
16 views

Prefix commands in batch

I am using a batch file to run Grunt with some console customization. I was wondering if there is a way to add grunt and a space to the commands I enter into the console. Here is my batch file: CD ...
2
votes
3answers
4k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...
0
votes
1answer
186 views

Batch file to find specific services that are not running

I have a set of services that I need to check to see if they are running or not. Some have set names, i.e. (ServiceX, ServiceY) The rest all start with a prefix. so far I have sc query | find ...
4
votes
7answers
18k views

How to get the Date in a batch file in a predictable format?

In a batch file I need to extract a month, day, year from the date command. So I used the following, which essentially parses the Date command to extract its sub strings into a variable: set ...
0
votes
1answer
56 views

How to start a cmd window and issue tail request in a bat file?

I can open a cmd window and start a tail by entering something like this: tail -f C:\Oracle\WebCenter\Sites\11gR1\Sites\11.1.1.6.1\logs\sites.log This is probably a stupid question, but how do I do ...
-1
votes
0answers
18 views

How to loop through all illustrator files in a folder (CS6)

I have written some JavaScript to save .ai files to two separate locations with different resolutions, one of them being cropped to a reduced size art board. (Courtesy of John Otterud / Articmill for ...
0
votes
0answers
26 views

What's the equivalent of Wevtutil in XP or 2003?

I have a batch file for saving event logs to our shared drive. I want to do this for XP and Server 2003 without very much effort. What could I use since Wevtutil is only on Vista and up? rem Script ...
2
votes
1answer
14k views

VLC command line batch video conversion

I am trying to convert some .webm file to mp4. In the GUI I select the following settings for the conversion: Video: Codec: H-264 List item Bitrate: 512 kb/s Frame Rate: 23.97 fps Scale: 1 ...
2
votes
1answer
516 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 ...
1
vote
4answers
669 views

How to read values in a particular column of a CSV file in Batch?

I am planning to write a batch script wherein I need to scan the values from a particular column of a CSV file one by one and store them in a variable for further processing. Say, following is the ...
6
votes
1answer
12k 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 ...
30
votes
15answers
114k 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 ...
0
votes
1answer
43 views

Notepad++ : Do batch text replace

I'm trying to create a dictionary file from several webpages I found online. The dictionary indexes headwords so that they can be easily found in search mode. The information in the webpage is divided ...
0
votes
1answer
19 views

Bulk resize / compress TIFF files [closed]

We support and host an EMR for several medical practices; these practices scan images into this software stored as flat files (TIFF mostly). Due to poor user training (people scanning text pages as ...
1
vote
2answers
3k 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 ...