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. Please use the tag [batch-file] for that.

learn more… | top users | synonyms

3
votes
0answers
28 views

Taking screenshots when I'm not logged in

I'm looking to take several screenshots from an application at a certain time of the day (let's say 3 o'clock, when I'm certainly not logged in) . Currently I'm using NirCmd to take the screenshots, ...
2
votes
1answer
46 views

Windows UnRar Batch script need to ignore .part02.rar through part99.rar extensions

I have two windows batch scripts that both work to recurse the folder they are placed in, and extract every .rar file into the folder of the rar files. however when a folder uses the structure: ...
1
vote
1answer
52 views

Write output of Windows Batch file command to text file?

I want to write the output of a robocopy command into a text file to see which files were copied. I tried robocopy drive:\ destination:\ /e /v>log.txt and robocopy drive:\ destination:\ /e /v ...
4
votes
2answers
53 views

for loop…in a for loop…in a for loop?

So I have a bunch of locations I need to check for two possible filenames, however the directory names vary. So here's essentially what I'm trying to optimize: for /r "%ProgramFiles%\WildGames" %%i ...
0
votes
0answers
30 views

Compiled batch file doesn't require admin privileges?

The following command requires admin rights: netsh wlan set hostednetwork mode=allow ssid=%ssid% key=%pass% However, when I compile the batch file to an exe using the converter at f2ko.de, the ...
6
votes
1answer
72 views

Variable for getting absolute path in windows batch script

I have following script to list out all the files, recursively from a directory, having a .phtml extension. @echo off setlocal for /f %%G in ('forfiles /s /m *.phtml /c "cmd /c echo @relpath"') do ...
0
votes
1answer
33 views

How to log executed batch files?

Let's say I executed 5 batch files yesterday and now I want to know the order of the execution of the files. Does Windows log the execution, maybe in Windows Event Logs or something? Or is there any ...
1
vote
0answers
78 views

How to use Bash script to find .mov files recursively and convert them to .mp4 using ffmpeg

I'm working on a Mac system in a video company where I have to clean up a lot of folders and subfolders containing large intermediate video files. So I've been looking for a way to batch convert ...
1
vote
0answers
29 views

Batch file with Loops doesn't work

I made the following batch file to sort some files, but I don't know why it does not work: pause for /l %%x in (1, 1, 12) do ( FOR /L %%G IN (1,1,24) DO ( for /r %%a in (*%%x*%%G*) do ...
1
vote
0answers
19 views

Block rename files with wrongly encoded filenames in Windows

I have a large number of files that (due to some multi-stage transport) have wrong filenames. For example a file that should be named Τεχνικός Di 04.02.2014 23_43.msg is currently named ...
3
votes
1answer
35 views

Interrupt batch job between files

I need to setup my bash batch job (compressing 5.1k files inplace) so that if I need to stop / resume the job it will wait until it is "between" files (has just finished one and hasn't started ...
3
votes
2answers
58 views

Batch Files to Remove minus sign from Filenames

I am attempting to clean-up some file-names in a particular folder and I'm wondering how I would go about creating a batch file to remove a minus sign from the beginning of each file-name. I have a ...
1
vote
1answer
56 views

Auto start PuTTY from command-line with a specific startup path

I start multiple PuTTY sessions everyday with a specific path in each session. I have made a command in batch file as Start "c:\putty.exe" abc@1.1.1.1 -pw abc123 22 How do I proceed further to ...
1
vote
2answers
66 views

Open file in Notepad++ as a tab without closing launched process

Some old tools are designed to work with an external text editor. I am stuck using a legacy tool that does this in the following way: Create a temporary file with the content to be edited. Launch ...
1
vote
2answers
91 views

Export Windows XP event logs cmd

I need to export a specific Windows XP event log from the eventviewer to a ".txt" file. My scenario is that the user programs a chkdsk to be execute on next reboot into a remote machine, and after ...
2
votes
0answers
37 views

Batch to enable and disable a setting in Internet properties

I'm trying to find a .bat script to enable and disable a certain setting when clicked in Control Panel > Network and Internet > Internet options > Advanced > Browsing > Use inline autocomplete in the ...
0
votes
1answer
44 views

Windows Batch to automatically unmap Network Drive on Wifi?

I have number of network drives for work. When I work from home, my computer is very slow due to these network drives trying to connect. Does anyone know of a script, which will automatically unmap ...
0
votes
0answers
13 views

create parent and child folders based on folders being transferred .bat script

I’m using windows 7. I am currently using the following .bat script file using scheduled tasked for once a day: set source=C:\Users\myid\Desktop\1 set destination=C:\Users\myid\Desktop\2\ xcopy ...
0
votes
1answer
59 views

Create a batch file to remove all files and subfolders in a folder

I have recently installed a new NAS and am trying to create a 'Temp' folder as I had before, basically a folder that is used to move files around during work hours and then deleted every night. My ...
0
votes
0answers
30 views

run batch file only when the same process is not in progress

I would need to run batch when user logs in, but if any other cmd.exe is running, then batch won't execute. Maybe something similar to this: How can I recognize a running batch file in task manager?. ...
0
votes
1answer
61 views

Using a Batch Script to Move Specific Files with Specific File Contents

I am looking to find a file with the contents 'Radiac' in one particular folder and then move all those files to a another folder. For example: I have might have 3 identical file-names with different ...
-1
votes
2answers
78 views

Rename Files In A Batch Script

I'm attempting to rename all files in a folder via a batch script but I'm getting an incorrect syntax error that I can't seem to identify: for %%f in (%Source%\*DebugLog.Config) do %%f ren %%f ...
1
vote
1answer
33 views

Batch file input issues on remote computer

I made a batch file that takes various inputs and then uses them in the commands ahead. This script works fine on my computer but when I put this script on another computer and use PsExec.exe to ...
1
vote
0answers
25 views

Login to multiple putty sessions, each with a new path

I login to multiple putty sessions everyday to start some services. So in total I have 20 different paths. So what I do is: I login to putty and copy/paste the path in each session. Now, what I ...
4
votes
1answer
22 views

Batch file - splitting a default gate way in to it's component parts, adding a number then reconstituting

Basically, what I need to do is get the default gateway of a Win7 machine which I have accomplished with the below code: @echo off for /f "skip=1 delims={}, " %%A in ('wmic nicconfig get ...
0
votes
0answers
43 views

How to tell from the command line if a PDF has an browseable index/table of contents?

I use Linux. I need a command line way to tell whether a PDF file has index/table of content. Knowing that a PDF file contains structures that could be called also an index/table of context, and to ...
0
votes
0answers
22 views

Win7 long filename passed into batch file only see short file name

I have a batch file that is called from the context menu , all it does is pass in the file name to the batch file. From the context menu [HKEY_CLASSES_ROOT\*\shell\Label Back Up File\command] ...
1
vote
0answers
66 views

Batch file to get remote system information in a loop

Sorry about the title, I struggled to explain it in one line. I have a simple script which gets a remote systems status, and returns the line which contains the total memory, and outputs it to a ...
-1
votes
3answers
44 views

batch script to copy from external PC

I'm trying to write a batch script for copying appdata files to my usb drive...i figured (which i'm not sure about) that if in any pc i plugin my usb %appdata% can be used as default path but for ...
0
votes
2answers
81 views

How can I make windows command prompt return a substring from a command ouput

My path is pointed towards a cloud folder (located at various places on my various devices) wherein I have stored a batch file that is supposed to locate itself on the machine, and then make that ...
0
votes
0answers
20 views

Batch with Multiple REG ADD /f but Some Lines Still Prompting for Confirmation

I created a CMD file with multiple REG ADD commands - they all are successful when it is run. All of the REG ADD lines contain a /f to force the change without confirmation. The are all contained in ...
-1
votes
1answer
62 views

Batch script to merge files using copy command in numerical order

Would appreciate it if anyone can help me with this request. I need a dynamic batch script which can do the below command for ANY number of files: Copy 1.txt + 2.txt + 3.txt + 4.txt newfile.txt If ...
2
votes
1answer
89 views

How to use wmic to kill a cmd.exe instance searching by it's command line?

I have seen that is possible to use wmic to find the id of a process searching for the command line which was used to start it. But I have 2 problems. I need to use this in a batch file so I cannot ...
1
vote
1answer
15 views

Alternative `batch` command for resources rather than load

I like the at and batch commands for scheduling long running tasks I do not plan to stick around to see. But my longest running tasks share resources other than just the CPU (databases, free disk ...
0
votes
1answer
27 views

Changing names of many folders with Windows console or batch file

I have a folder with many folders inside. They have a name pattern: dd-mm_PSD and I want them to be named with that pattern: mm_dd_PSD becouse it's easier to manage. Can I do it "globally" with ...
0
votes
1answer
96 views

How to launch minecraft 1.8.5 from Command Line

I'm working on a custom MC Launcher, but I can't find a way to run Minecraft (1.8.5) from the command line. I saw some other examples which used to work fine on 1.7.2, but I can't get that code to ...
-1
votes
1answer
128 views

Using Winrar's rar.exe with commandline interface to archive sub folders

I was hoping someone might be able to answer this. I've seen similar questions, but none specific to my question. Using rar.exe in a batch file under Windows 8.1 PRO I want to archive a set of sub ...
1
vote
1answer
33 views

Batch renaming JPG filenames in CentOS 7

I have about 80 of these files in my directory. -rw-rwxr--+ 1 vagrant vagrant 38122 Nov 13 12:19 CRMPicco RFC16 Women's 80.jpg -rw-rwxr--+ 1 vagrant vagrant 101286 Nov 13 12:19 CRMPicco RFC16 ...
0
votes
0answers
32 views

Batch (program) to monitor, copy files

I need to copy files from ftp. There are new files every ~ 30s. I need to move them to directory. I try synchronize with winscp but from local directory files are taken and synchronization keeps to ...
1
vote
2answers
81 views

Move all files from multiple subfolders into the parent folder

I would normally open the parent folder and search for * in order to select all of the files in subfolders, but in this instance, I have over 1,000,000 files that I need to sort through, so my ...
0
votes
1answer
60 views

Issue with network drives freespace check - Powershell script

I have a batch file which deletes some files from the network drives and then calls a powershell script. The powershell script gets the space details of all the network drives, and send out a mail. ...
1
vote
0answers
10 views

Find all files that occupy the sector range on NTFS

How can all files that occupy the sector range (not particular sector) be found on NTFS? The solution I'm using now is to process the sectors in batch with Micrisoft nfi. And it doesn't suit me, the ...
0
votes
0answers
18 views

Unicode code points converted to characters in batch

To convert code points to characters you can, for example, place the cursor next to one of them and press Alt+x. I have a document full of Unicode characters' code points. I would like to substitute, ...
0
votes
2answers
410 views

Script to change wallpaper in windows 10 not working

I am trying to get a script to work that will change the default wallpaper for windows 10 because I will be deploying Win10 to all clients. When I run the batch code below, it is not changing the ...
0
votes
2answers
27 views

Variable wont work when made in IF batch program

I am trying to make a game, and whenever I try it, it says there is a syntax error when it is right :Q3 echo ==================================== echo Do you want to be skilled in: echo. echo Speed ...
0
votes
0answers
29 views

Geany “send current selection to” command line or batch file(as argument) or browser in Windows

I am using Geany version 1.25 on Windows 7 x64. I tried to send current selected text by setting Context Menu >> Format >> Send selection to >> My command but it isn't working. I ...
0
votes
1answer
30 views

Running command on remote windows server and add results to a text file

I am trying to find the installed version of a piece of software on a lot of servers (800+). The command is: "dsmqver -f 2" which returns output like "Version: 7.5.0.2" I have been trying to ...
0
votes
2answers
156 views

Automatically print word document using bat file

Automatically print word document using bat file "C:\Program Files\Microsoft Office\Office14\winword.exe" "D:/new/CABSC.docx" /mFilePrintDefault /mfileexit using this bat file I am able to print ...
1
vote
2answers
180 views

How to get a registry value and set into a variable in batch

I need to get a value in a registry key and store in a variable using a batch file. I wrote a basic command line to exemplify my logic (using echo instead of setting a variable): for /f "tokens=3 ...
0
votes
1answer
24 views

Windows Batch: read line that raised errorlevel

Is there a way to read the line of code that raised the errorlevel from within a batch file after its execution? (I'm afraid there isn't). For example the command net use H: \\MyComputer\sharename02 ...