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

20
votes
5answers
13k 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 ...
0
votes
3answers
3k views

Batch script to append record to csv files

I have a bunch of stock data in csv's that I am backtesting trading strategies on. The problem is that my strategy buys the open market price if a signal was found yesterday, unfortunately my data is ...
0
votes
1answer
21 views

Batch file rename with suffix as random alphanumeric

Here is the code which renames all the files in a folder to alphanumeric. @echo off setlocal disableDelayedExpansion set "chars=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" for /f "eol=: delims=" %%F in ...
0
votes
2answers
3k views

Copying a set of local files to FTP server

I want to copy a set of local files to ftp://124.30.124.230 (it will ask username and password). I want to do this work in 400 systems. I have planned to do this work by creating a batch file and ...
6
votes
1answer
2k views

How do I determine if a process on Windows “has no parent”?

I am trying to figure out a way through the Windows command line to determine if a process has no parent. I know all processes technically have a parent that is controlled by the OS or whatever, but ...
2
votes
1answer
680 views

Turn on WiFi radio through CMD

I'm questioning if it's possible to enable your wifi card/antennae/radio with a CMD command, like "wlan enable" or something? I would like to do this so if someone forgot to turn on his wifi, this ...
1
vote
1answer
18 views

Batch process on photos to be match based on eye positions

I'm not sure if this question related to this site. I have a series of photos (faces) that are different in distance and pose from camera (all of them are selfies) want to match them based on eyes ...
2
votes
1answer
59 views

Windows Batch File Rename to Replace %20 Characters with _

I have a folder with a lot of files that I need to rename. The original format for example is ABC%20DEF%20GHI%20JKL.xyz. What I need to do is to replace each %20 with _. So essentially I'm parsing out ...
1
vote
1answer
3k 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
2answers
29 views

Copying and renaming of .xlsm files using batch

Its glad to be here and i am really excited n new to batch scripting. I have been using a batch containing below for copying an excel from one folder to another { @echo off cp -r ...
2
votes
2answers
38 views

Batch merge/mux .srt with .mkv files

I have a folder with: TVShow - Episode 01.mkv TVShow - Episode 01.srt TVShow - Episode 02.mkv TVShow - Episode 02.srt TVShow - Episode 03.mkv TVShow - Episode 03.srt and so on... I already know ...
-1
votes
0answers
11 views

How i exclude from deletion some files inside a FOR /D %%G (“folder”) do erase “%%G\folder2\folder3\*.*” [duplicate]

I made this line for /D %%G in ("%SystemDrive%\Users\*") do erase /F /S /Q "%%G\AppData\Local\Temp\*.*" how i can make it so "file.exe" is not deleted on this command or is there a better way to ...
2
votes
1answer
45 views

Batch Script to Bulk Rename Files - Strip off Parenthesis and all Characters between

I wish to rename a group of files in a particular folder in such a way that everything between and including the parenthesis is erased. For example a file with the name of: "78 Tax Tips for ...
3
votes
0answers
14 views

Terminate the Access macro after a specific time

I am running several MS Access macros from a batch file. The macro runs several queries in AccessDB. Things are working fine. But, I want to add a check. If a macro runs longer than a specific time, ...
0
votes
1answer
31 views

can you start a program at windows startup using bat file and send it file path

can a bat file or vbs file take an argument (a path to an exe file) then create a shortcut to that file and place in the startup folder or add a registry entry to run that exe at windows startup but ...
1
vote
1answer
13 views

“If” statements not working as demanded in batch game, and math not working properly

When the following piece of code is run in my Batch game for a fight, no matter what the input is it will always attack and go to FIGHTPROCESSORLOOP, and will tell me "Unbalanced parenthesis", while ...
2
votes
2answers
216 views

Status of the process while Windows scheduler working

I have a .bat file which should kick off every 30mins. I am using Windows scheduler for this. I have some questions on the same: Does the scheduled task starts at a scheduled time even after a ...
1
vote
3answers
95 views

Disabling the “Windows cannot find '[foo].exe'” popups

When I use the start command in a batch script to launch a program, I expect that program to be launched asynchronously; this happens exactly as I'd expect it would if the program that I'm launching ...
0
votes
1answer
56 views

Windows batch file not running when I double click, how to restore association with cmd.exe?

Windows 8 64-bit. The user I'm logged in as has admin rights. When I open a cmd windows the window title even says "Administrator: cmd.exe". So, I set my .bat file association to have the .bat file ...
0
votes
0answers
23 views

Could not start PSEXESVC service on Target Machine

I want to run batch file into remote machine and i was using psexec cmd for that but i got error like "The remote procedure call failed." My command is, E:\user>psexec -i -s -d \\192.168.1.41 -u ...
2
votes
3answers
174 views

Batch file won't run as administrator unless via cmd prompt

I'm trying to write a batch file that will turn Apache off and copy some files. This is all I have in the script at the moment: "C:\Apache24\bin\httpd.exe" -k stop If I either run the batch file ...
0
votes
1answer
16 views

Copy file name to clipboard and paste it in chrome omnibox

What I'm after is to be able to come home and have the webpages I need already open. Using a combination of IOS Siri & Reminders, Evernote, IF (formerly IFttt) and Drop-box ive managed to be able ...
49
votes
17answers
203k 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
0answers
22 views

Moving Files From a folder into other folders

How do I move files (.mp4 .avi .mkv) from a folder on my desktop to one on an external drive. The folder map looks kind of like this: C:\Users\Zac\Desktop\Finished\Folder1 ...
1
vote
1answer
17 views

Run Atom using a bat file after changing directory

I have writen in my bat file cmd /k cd /d"C:\Users\amanz\Desktop\Introduction - Computing\Java files" call atomer.bat right now, it just seems to change the directory and stops right there. It ...
0
votes
1answer
23 views

Batch convert TIFF to PDF and add text

I got a bunch of TIFF files that I am interested to convert to a single multipage PDF file, which should be easily achieved using ImageMagick. However, I'm also interested in adding text to each ...
0
votes
1answer
20 views

Batch file to detect when a device connects to hosted wireless hotspot on a laptop

I have created a wireless hotspot on my laptop using: netsh wlan start hostednetwork This works perfectly. I have a raspberry pi that automatically connects to this network automatically, however ...
1
vote
0answers
22 views

Creating a CMD Context menu to copy filepath

So I created a context menu in the registry HKEY_CLASSES_ROOT > * > shell > copy > commmand > cmd /c dir "%1" /b /a:-d /o:n | clip What this does is copies the file name when I right click on a ...
1
vote
2answers
96 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 ...
1
vote
1answer
68 views

How to search for a specific file with batch

I want to create a batch and need to find a specific file, is it possible to find it? It has to be a command that searches through all drives until it finds the file, I want it to be usable for ...
1
vote
1answer
20 views

Bat file doesn't log when running from task scheduler?

I made a bat file which restarts 2 services, and I have it run in task scheduler. If I run the bat file normally, I can see it logging in current directory as the bat file. But if I run it through ...
2
votes
0answers
22 views

Why is this DOS batch file that installs Cygwin unattended failing?

After assembling information from all over the Internet, I've managed to come up with a DOS batch script that should be working AFAICT, but after the Cygwin setup executable finishes (seemingly ...
0
votes
1answer
22 views

Create schedule task from xml file by batch file

I have a schedule task in my test machine. Test machine is win 7. I export the task in xml and I am trying to create a new similar schedule task as i will have to create same schedule task on more ...
1
vote
1answer
19 views

Multiple line Windows Batch File issue

I have a batch file with following contents Line 1 "C:\Program Files (x86)\Dell\SysMgt\bmc\ipmish.exe" -interactive -ip 192.168.1.5 -u root -p Password after this it goes to prompt IPMISH> Line 2 ...
0
votes
0answers
23 views

Write on screen directly on top of everything

Is there any way to make some huge text appear on screen on top of everything? something as shown below. I know I can use Rainmeter but i need something that can be used in batch files.
1
vote
1answer
31 views

How to batch copy & rename files?

I'm using windows server 2012 R2. I have a folder with a bunch of files and I want to copy for every file in that folder 20 times into another folder but the newly copied file has to be renamed using ...
0
votes
0answers
22 views

Batch render .mp4 to .webM keeping folder structure

I'm not a native mac user but I've managed to put together a code for batch converting .mp4 to .webm which is: for i in *mp4; do ffmpeg -i $i -c:v libvpx -qmin 0 -qmax 20 -crf 10 -b:v 1M $i.webm; ...
0
votes
0answers
194 views

How to run executable on a network drive in compatibility mode from command line

I have an application (written in Powerbulder 9) that calls an executable on a network drive through the command line. Many people use this application with the same executable on the network drive. ...
3
votes
1answer
11k views

How do I check many RAR files for corruption at once?

I have more than 20 gigabytes of RAR files, of which some have been damaged. Can anyone tell me how to find out which RAR files are corrupt without trying to extract each archive?
1
vote
0answers
23 views

Install network printer with batch file

I have one printer connected to a RaspberryPI and many clients. To save time, I want to create a batch file, that installs the printer and its driver automatically. Here is what I have by now: ...
1
vote
2answers
41k views

Create new directory with batch file (MKDIR not working)?

I tried using at first a combination of xcopy and del, but del kept failing. xcopy creates directory if it doesn't yet exist. The other option is to use MKDIR but it does not work inside a batch ...
2
votes
1answer
22 views

Batch FOR loop not working

So I am trying to a procedure of converting images in a directory, but it just doesn't run at all, and I fail to see what's incorrect in my batch code: FOR /R %a in (*.png) DO ( files\pngnq -s 1 ...
1
vote
1answer
60 views

Net Use command with relative target path

I have a batch file located in several folders and in this file I need to replace the old subst T: . command for net use because the units (drives) have different properties in windows 7. However, I ...
-2
votes
0answers
17 views

Is there a label/goto in python? [migrated]

We can use goto and :label in batch. Is there anything like it in Python? I am a beginner in python. Thanks SuperUser
15
votes
8answers
14k views

How to run commands as in a queue

I need to do a lot of copying of various files to various folders. I can add all my copy commands to a bash script and then run that, but then I must wait until it finishes if I want to add more ...
0
votes
0answers
32 views

Batch Delete User Files every 2 Weeks

I need a Batch-Script which delete Private User Files every 2 Weeks. User Files Admin, Public and a Domain-Account "dJas" shouldn't be deleted. This Script crashes Windows @echo off & setlocal ...
0
votes
1answer
78 views

How to run batch file at startup (Windows 10)

I am trying to run a batch file with these contents: ECHO OFF TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /internal TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /external I've tried putting a shortcut to it ...
1
vote
1answer
38 views

Command in batch file in Windows

I have the customer display Logic Control LD9000 and POS software, on customer display I want set normal display mode, so I send in CMD in Windows ECHO ^Q>COM1 The display changes display mode ...
1
vote
5answers
2k views

How can I convert a Windows batch script to a .exe?

I have a fairly simple batch script that I would like to execute using a macro on my fancy gaming keyboard. However, SteelSeries Engine only supports opening a .exe file with the macro buttons. Is ...
0
votes
1answer
3k views

Changing Gateway and DNS addresses with batch file

I'm having a little crisis every time I have to change the gateway in order to access different sites from my workplace. It's time consuming and I'd be really glad if someone provides me with a script ...