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

1
vote
2answers
33 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
2
votes
2answers
83 views

does start title and tasklist /fi windowtitle reference the same title?

I was looking up the start and tasklist commands, and i noticed 2 things. They both had references to a window title. start "myTest" /b somefile argA tasklist /fi "WindowTitle eq myTest" the thing ...
0
votes
0answers
37 views

Command Line to “batch” unrar many Archives into Subfolders accordingly

in Windows 10, i have an folder F:\archive with about 300 different "File 1.rar" "Otherfilename 307.rar" Knowing Linux better then Windows I spend some time to compile the following command and it ...
0
votes
0answers
40 views

How to connect to a wireless Display adapter automatically through scripts or Task Scheduler?

I am trying to project files to a Samsung TV which has a windows display adapter. I want to automate the entire process. So when the TV is switched on, I want the computer to continuously check for ...
1
vote
1answer
32 views

Batch echo command issue

It is inside the 2 pauses. I cannot understand why it is not working. Do mind the rest. It is a part of TGBF. As far as I can tell the text after the echo is an error, but I don't know why? Does it ...
0
votes
1answer
29 views

Unable to execute FOR loop from batch file

I am trying to execute the following command from inside a batch file: @echo off & for /f "delims=*" %A in ('dir /s /b') do echo %~fA %~zA >> "\path\to\output.txt" I found this command ...
0
votes
2answers
58 views

How to run multiple batch files with one master batch file

I have three bat files I would like to run, in three different directories: directory/bat1/bat1.bat directory/bat2/bat2.bat directory/bat3/bat3.bat I would like to use one master .bat to start all ...
0
votes
0answers
33 views

Batch script with FOR /R and ECHO don't work

The script below don't work, it doesn't create the file with the ECHO command. If I run the FOR line (changing %% by %) in CMD it's working perfectly. Do you know why ? SET TXTDATDIR=c:\TEST\EXPORT ...
1
vote
0answers
19 views

How to batch delete files based on their checksum matching an existing list of checksums

I'm looking for a means of deleting files based on their checksum matching a list of previously seen checksums in a text file or some other list. The context is a large photo organization project ...
0
votes
1answer
61 views

Make ConEmu close after exiting batch file

I am running a batch file from ConEmu and want it to be as little intrusive as possible. I have set ConEmu to run minimized and close on exit. But.. after the batch is run, the window stays open and ...
0
votes
0answers
52 views

Windows Batch - Insert file name and spacer into contents of all text files in a directory and subdirectories

I have a directory and subdirectories of text files like this: my text What I'd like is to insert the file name (with or without the '.txt') and some spacing characters into the beginning of each ...
4
votes
1answer
69 views

Batch script to delete specific folders

I want to be able to run a script at a parent folder that contains other folders, the script will delete all the folders of a certain name. So for example to remove all the bin folders and only them: ...
3
votes
2answers
70 views

Batch file rename with suffix as 01 02 03 04 and so on

I have bunch of files with similar keyword like computer-stock-photo.jpg computer-stock-picture.jpg computer-picture.jpg What I want to do is suffix serial wise 2 digit numbers like computer-...
0
votes
2answers
58 views

How to execute 2 commands inside a single runas?

When executed independently, they execute perfectly. When executed in 2 consecutive runasstatements, chrome.exe is executed before robocopy has had a chance to finish. When placed inside a single ...
1
vote
1answer
47 views

Export a csv file to multiple csv files with batch command

I have a 100 line csv file, with 5 values per line. I am looking for a way to export each line to its own csv file adding a 2 line header to each. I have used the split command seen elsewhere to ...
0
votes
1answer
71 views

Parsing a string variable in a batch file for LAPS / ADU&C

I am trying to implement LAPS (Local Admin Password Solution) on our network and I am having issues integrating LAPS with the ADU&C right-click context menu. My goal is for our Helpdesk staff to ...
0
votes
1answer
42 views

How to do a FOR loop properly in batch script in windows

I am trying to convert from a bash script, this is what I came up with. When I try to run this, I get the syntax of the command is incorrect error. I followed this post and wrote the commands.What is ...
0
votes
1answer
49 views

Losing characters when copying and pasting into a batch file via VBA

I am currently using the following VBA code to copy and paste a range of data in an excel file to create a Batch file. I am running into the following problems: Quotations are being placed around ...
0
votes
3answers
54 views

converting a simple sh script to the equivalent batch script on windows

This is the script that I need to convert to batch file in windows : #!/usr/bin/env sh TOOLS=./build/tools $TOOLS/caffe train \ --solver=examples/cifar10/cifar10_full_relu_solver_bn.prototxt ...
0
votes
0answers
15 views

how to enter commands in a cmd window and keep it open with a batch script?

How can I create a batch script, that opens a cmd window, issues commands in it, and then keeps this cmd window open? I have a production system, where I have to operate quite often using a special ...
0
votes
0answers
7 views

Loading formating into Evernote with text file

I am trying to set up a system to automatically generate and open a Note in Evernote, using a .bat script. I need to the Note to have some formatting and also be able to have some unique content ...
0
votes
1answer
45 views

Change CreationTime using the file name

I name all of my home video files according to an exact protocol. An example is: Aug 09,2005@13.21.12.mp4 Typically, the original file is not an mp4 so I go through the process of converting, ...
0
votes
1answer
78 views

How to output net group command in list format in batch

I'm using the net group "Groupname" /domain command which outputs a bunch of users in the group in the format of 3 columns. There are spaces between the columns. How do I output the command so that ...
0
votes
3answers
2k views

What is the “language” of a .bat batch file on windows?

When windows is running one of these programs what is the actual language being used? I am guessing C++ sorry if this is in the wrong area this is my first question :D
2
votes
0answers
31 views

Converting Multiple .doc files to searchable .pdf

I have a batch command file that runs daily converting data extract files to .txt, .doc, and then to .pdf formats. I run a series of formatting macros in Word on the .txt file before saving to .doc ...
1
vote
0answers
30 views

Auto Sort files from one folder to another

I am looking to create a folder that whenever a file(s) is placed into it, a batch file is triggered to properly place the file(s) in the correct folder(s) based on aspects of the filename (similar to ...
1
vote
1answer
96 views

Batch Loop used to reg query a list of keys from txt file and reuse data value

I need a batch loop that should extract a data value and use it in its next command. All registry keys I want to query has been saved into a *.txt file. Example: The following command will return ...
1
vote
2answers
35 views

Windows gVim edit file from Command Line

I have a Windows batch file that I use to edit files using Notepad++ @echo off if [%1] == [] ( C:\PROG\Notepad++Portable\Notepad++Portable.exe ) else ( C:\PROG\Notepad++Portable\Notepad++...
0
votes
0answers
42 views

Set specific User's account picture via Batch script

Background: Our company is a small MSP. I have written a script that works well to create our local admin account and set us as a local administrator. That part isn't super important. The main thing ...
0
votes
1answer
54 views

Xcopy a .txt over the network and add a date

I'm trying to take a .txt file and move it over the network with xcopy. Here is my code thus far: @ECHO off XCOPY /y pushd \\Oafrpnbtcsi01\Test_Systemplatz\Systemplatz_SLOT_1_Fail.txt rem get date,...
0
votes
1answer
45 views

How to start a server via Jenkins without outputting the server trace in the Jenkins console?

I have written a windows batch script to start an apache tomcat server via Jenkins. When the server starts to run, server trace is shown in the Jenkins console. But all on a sudden the window of the ...
-4
votes
1answer
46 views

Need bat file to randomly move 30 photos from a folder to another

I have a folder "C:\TEST\Clean" with many photos (let's say 436) and I have to move 30 of them to the folder "C:\Dropbox\Apps\AutoPost\For_Post_1". I have this so far but it's for 1 file and I need ...
0
votes
0answers
24 views

Some guidance in a .bat that adjusts the Screen Saver via Active Setup?

The request: I was asked to look into changing en masse our screen lock policies here at the main office, which would be easy enough to do if I remote logged on and made adjustments one-by-one. But ...
-1
votes
1answer
44 views

Cleanup Windows on startup or shutdown

My Environment Multiple VMs all comprising of Various versions of Windows which is power on/off as needed i like to cleanup my %temp% and other places on reboot so as to save space and also speed up ...
1
vote
0answers
67 views

Renaming a pdf file (scanned document) using OCR. It should read 3 zones and rename accordingly. e.g. Streetname_LastName_Date.pdf [closed]

I am running into trouble with tons of paperwork. I want to have it digitalized in order to simplify search and therefore cut down a huge amount of time spent on looking though the paperwork. It is ...
2
votes
1answer
122 views

How to delete all files that don't have a certain string in their name

I have seen Deleting all files that do not match a certain pattern - Windows command line However, I have not seen anything regarding how to delete everything that does not contain a certain string ...
1
vote
1answer
277 views

Batch command to open url and fulfill username and password

I'm currently opening a local url from batch command (.bat file) like this: @echo off start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE http://some_local_address:88 This is working fine. ...
0
votes
0answers
43 views

malware or Google Drive not working due to batch file being opened by text editor by default

I'm seeing some suspicious behavior on startup, and am wondering if I should be concerned. What's happening is C:\Users\<me>\AppData\Local\Temp\tmpevpnra\run.bat is being opened in Notepad++. I'...
0
votes
0answers
12 views

Toggle what happens when the lid is closed, with a batch file on the desktop? [duplicate]

Is it possible to create some kind of batch file which can be added onto the desktop, which toggles whether my laptop sleeps or does nothing upon the lid being closed, in Windows 10? Usually i like ...
1
vote
1answer
107 views

PowerShell & Batch files

I have written a PowerShell line directly in PowerShell and it works perfectly but I can't get the .bat to run it. I think my PowerShell script running is blocked by corporate. If I can get the ...
0
votes
1answer
46 views

Copy file names to clipboard but skip file extensions

I'm using this script in the batch file I created to copy the filenames to clipboard then I can use, @echo off set dirpath=%1 dir %dirpath% /b /n | clip exit I created a shortcut in Windows SendTo ...
0
votes
0answers
55 views

Command from batch file not recognized unless run from Desktop OR as administrator

I have installed UnZip so I can extract files by running batch files, I added the bin folder to both PATH (user variables) and Path (system variables), but I still have the following problem: I ...
0
votes
1answer
54 views

Batch convert flv to mkv with mkvmerge

I have a bunch of *.flv videos in a folder on my Windows computer that I would like to convert (or remux) to *.mkv. Since I have a lot of files I would like to automate this process with a batch ...
0
votes
0answers
30 views

pscp not accepting passwords with -pw in batch FOR loop

I am trying to copy a list of files from local (Win7) to remote (Ubuntu14.04) with pscp. The paths to my files are stored in a text file file_ids.txt: T:\file_1.txt T:\file_2.txt T:\file_3.txt The ...
0
votes
0answers
21 views

Run a batch file whenever a file in Dropbox is updated [duplicate]

I need to get a batch file which is stored on my Windows PC hard drive to automatically run whenever a file in one of my Dropbox folders is changed. How can I accomplish this? Note: The amount of ...
0
votes
1answer
27 views

Trouble in using Xcopy to copy to a network path in batch file

Code: ::CopyTest.bat @ECHO echo 123>>%temp%\MBDocuments.txt xcopy "C:\Users\Foo\Documents\" pushd "X:\foo team\Team Members\foo\Documents" del /q %temp%\MBDocuments.txt pause So I have ...
1
vote
1answer
34 views

Batch Inverting .PNG Images while maintaining transparency

I have a large number of monochrome PNGs that are black on transparent. I would like to invert them to be white on transparent. I've tried using XnConvert but it doesn't maintain the transparency.
0
votes
0answers
28 views

Batch - Schtasks Onstart Repeat Interval

Command I'm using: SCHTASKS /Create /SC ONSTART /TN "TaskName" /TR "path" /RU "user" /RP "pass" /RL HIGHEST I'd like to repeat this task every 10 minutes, which would be doable with the /RI flag, ...
1
vote
2answers
175 views

Script to merge a specific line of multiple .txt files into one .txt file

I have ~800 .txt files. I need extract the name of each file, and one line inside the file, and export it to a new .txt file. The line I need to copy will always start with "System Boot Time:" I'd ...
1
vote
1answer
141 views

How to open cmd and run a batch file in it in one command

I'm making a program which runs C++ using G++ and to build/run it, it creates a .bat file which should then be ran in a new cmd window. From Java, I can run commands, but just running a command doesn'...