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

0
votes
2answers
69 views

batch file to find a word, extract 2 line above the word and write it in diffrent text file

In my scenario i need to check my file (XXX.txt) for the word "SPOT". There will be few of SPOT word in the file. Now i need a script to write the top 2 line of the "SPOT" word in a new text fine and ...
0
votes
1answer
82 views

How to use Powershell command invoke-sqlcmd in batch script

I have a Powershell command that I want to be run in a batch script. It works well in the Powershell console, but I cannot call it properly in batch script. The Powershell command goes like this: ...
0
votes
1answer
35 views

.bat that calls AFUDOS to flash BIOS

I've got a .bat file that is supposed to flash the BIOS on my laptop. It reads as follows: @AFUDOS T.105 /p /b /n /e /x /reboot Before actually running it, I would like to unterstand what it does. ...
0
votes
1answer
45 views

Win7 - Batch convert script - mp3 to ogg?

Trying to convert some mp3 to ogg using VLC on Win7. I started by modifying what I found here, but couldn't get it to work: How to convert several files of one type (e.g. wav to mp3) using VLC or ...
-1
votes
1answer
38 views

How to add a program in safe mode start up registry using batch script?

We have a custom student computer activity monitoring software. I need a batch script to add this program in start up registry so no one can avoid by using safe mode. I want edit this registry ...
0
votes
1answer
64 views

FFMPEG concat intro video to each file in directory (all mp4)

I'm trying to write a concatenation script (for osx) to add an intro.mp4 video to over a hundred other mp4 videos in a directory. The codec will stay the same mp4, the intro filename will stay the ...
0
votes
1answer
31 views

Nested for - batch

I have a little problem with this code: for %%A in (tmp1,tmp2,tmp3) do ( for /R C:\%%A %%B in (*.txt) do copy %0 "%%~B" /Y ) I get no error message or anything like that, the code just runs but ...
1
vote
1answer
53 views

How can I create a shadow copy in windows7/8 in a batch file?

On server operating systems I can (and do) create a shadow copy of a volume and mount that copy using mklink before copying a folder that almost always has open files. See below for Q&D example. ...
0
votes
1answer
61 views

Add Date-Time Stamp To Copied File using Windows Batch

I thought this would be simple but it seems more of a challenge than I thought. I want a file to be copied and pasted with a time stamp appended. I get the time stamp using this code: set ...
0
votes
1answer
26 views

How to process files with purely numerical extenson [ regex ] Windows

Windows, batch. I want to process files in batch for loop. The problem is:I have no idea what exactly the extension will be. What I do know is that it will be a number. So what I'm trying to create ...
0
votes
0answers
25 views

METADATA_BLOCK_PICTURE header for vorbis ogg. How to batch (windows cmd.exe) or rebol create it?

I have searched the web with no success :( Is there anybody out there able to help with a working example on how to create the header for the METADATA_BLOCK_PICTURE for vorbis ogg ? (batch (windows ...
1
vote
2answers
37 views

Detect a running process with spaces in filename

I am trying to detect a running process on Windows 7 using a batch file. Processes without any spaces work just fine - e.g. notepad.exe. I cannot understand why it doesn't work and would really ...
0
votes
1answer
105 views

Powershell Folder monitor/batch execution

I am new to Powershell. I have found a script that works with what I need, kind of. What I am looking for is a script to monitor a folder for specific file names/types. Depending on the file ...
0
votes
1answer
50 views

search and replace string using batch or perl script

How can i search for "//packages/thirdparty/release/main.txt #10" and replace #10 with #15(set VARIABLE="#15") using batch commands and also ignoring spaces. #10 can be anything, lets assume #XXX. ...
1
vote
2answers
54 views

How do you create system variables via batch file for Windows 7?

How can I create a batch file which creates a new system variable? (You know, in advanced system settings > environment variables > System Variables). I want to create a new variable named ...
1
vote
1answer
33 views

'fsutil' is not recognized as an internal or external command in Batch Script

Here's my script which basically creates a file and converts it to a sparse file SparseFileCreator.bat @echo off echo ************************ echo * SPARSE FILE CREATION * echo ...
0
votes
1answer
59 views

How to make batch file to open specific Profiles in Google Chrome

I have .BAT batch files to open a set of programs, web pages and explorer windows. With sufficient Googling I've still come up short as how to execute the profile target "C:\Program Files ...
0
votes
0answers
63 views

Windows Shutdown Times (hour-minute), how can I know - Is there any small batch file or something similiar for this?

I used to learn the Windows Shutdown times from event viewer - however in windows 8.1 as you may be aware there is no full shutdown. So I can not view the system shutdown time. But I do not want to ...
0
votes
1answer
51 views

Anki Cards: Batch import audio media

I have a spreadsheet of over 5,000 cards that I want to import into Anki. On each row, there is a reference to an audio file. Is there anyway to batch import the audio files? I know after the ...
0
votes
1answer
17 views

How to run b2sum-amd64-windows command recursively in a batch file?

BLAKE (hash function): https://blake2.net/ Download: https://blake2.net/b2sum-bin_20130305.zip The current b2sum-amd64-windows command does not include recursive option For example in windows ...
0
votes
1answer
38 views

How do you get the User Profile name in a Batch File without the complete path?

I've seen that you can use %USERNAME% to get the whole path but I just want to get e.g John Doe for use in mapping a network drive to specific folders named after the user profile names? e.g NET USE ...
0
votes
0answers
24 views

Echo Without Newline in a Windows Batch `for` Loop [duplicate]

Please note: This question is not about how to echo without a newline. It's about to pipe a variable without a newline and store the result in another variable. Please don't mark this question as ...
0
votes
1answer
29 views

Xcopy.exe: Hide all errors (window prompt)

I syncronize a folder on the hard drive with my USB device every time I insert it. For this I use a simple batch script that checks if the USB stick is inserted and if it is then do a sync by XCopy. ...
0
votes
1answer
67 views

Rename files using batch file

I have been searching for a way to rename 150 files daily simply by executing 1 command. The current files are in the same folder C:\reports. The file names differ and the only change I have to make ...
0
votes
1answer
56 views

Batch script to conditionally delete files

Owners of Nokia Lumia 1020 know it can be set to store captured photos at full resolution, but the reduced size photos are also stored. I would like to have a script to automatically delete all the ...
1
vote
1answer
30 views

Bulk SFTP download of files specified by URL preserving directories

I have a list of several hundred files I need to pull via SFTP. They are located in various directories and I need them to be in the same directory setup on my local machine. It is important the files ...
0
votes
0answers
23 views

Batch change txt with constant input but variable output

I have a text document with 364 words. And i would like to save every single word from this document as a separate .svg image. So as end result I would like to have 364 separate .svg files with each ...
1
vote
3answers
190 views

how to make a batch file to rename a folder when I start and close a program? [closed]

How to make a batch file to rename a folder when I start a program? - Let's say I want to start my word.exe, at the same time I need to rename a folder c:\users\my profile\my word documents to be my ...
0
votes
1answer
80 views

Running .bat file in zsh (in Windows)

On a Windows machine I want to avoid using cmd.exe at all cost. I'm trying to use babun (mintty 1.1.3) to run a batch file in a Windows folder. This works: { ~ } » ./file.bat -o /path/to/files.xml ...
1
vote
4answers
92 views

Renaming files,folders and subfolders recursively by using batch script

@echo off SETLOCAL ENABLEDELAYEDEXPANSION SET old=V1 SET new=newdocV2 for /f "tokens=*" %%f in ('dir /b *.ods') do ( SET newname=%%f SET newname=!newname:%old%=%new%! move "%%f" "!newname!" ) ...
0
votes
0answers
34 views

Computer does not stay awake after scheduled task

I have a scheduled task that wakes up the computer to run a batch file. However the computer turns back off after some time. I have my computer set to (never sleep) so after waking up from the task it ...
1
vote
0answers
81 views

Using batch to automate manage-bde

We would like to encrypt C (full disk) specifying a startup password (we are ok with this in plain text, it's temporary) and simply backup the recovery key to the desktop. So far what's working is ...
0
votes
3answers
40 views

I want to rename the bulk files and folders at single time,how I can do this with batch scripting

I want to rename the bulk files and folders at single time,how I can do this with batch scripting I have the code for only to change either file or folder,not both @echo off SETLOCAL ...
0
votes
1answer
22 views

Identify and kill batch script started before

I need help regarding batch script handling, help because working with on-board tools again, no extras installable. I have a CMD.exe script that gathers information about running processes (via ...
0
votes
1answer
29 views

How to use batch file to do X if it's ran on a laptop?

How do I write a batch file to do different things based on whether it is ran on a desktop vs. laptop? E.g. if on desktop, install x. If on laptop, skip x and install y instead. Edit: Windows 7 ...
0
votes
1answer
55 views

xcopy wont copy shortcuts

Example code where shortcut resides: xcopy "Google Chrome.Ink" %CURRENTUSER%\Desktop Another Example where chrome.exe exists: xcopy /B chrome.exe %CURRENTUSER%\Desktop Both result in: ...
2
votes
1answer
180 views

batch file runs fine manually, but line that launches exe fails when batch run in task scheduler

I have a batch file (below) that works perfectly when run, however, when I set up the bat file in the task scheduler it ain't working right. The task scheduler does indeed run the task successfully, ...
0
votes
0answers
22 views

Pop up notification on system tray when a new file added to a directory

How will I add a pop up notification on my system? Let's say I have a directory wherein everyday I have a batch process running and keeps on adding files to that directory? How will I add a prompt so ...
0
votes
1answer
37 views

What does the percent sign indicate when used as a directory in batch files?

I have made a few batch files the hard way by CD-ing into the directory by typing all the way from root drive to folder. I have seen a few example codes use percent signs enclosing a few key words and ...
1
vote
1answer
51 views

Edit windows service user with a batch script and encrypted password

I need to change the user of a service on Windows using a batch script. Searching the web I found this solution: sc \\server config ServiceName obj= Domain\user password= pass The problem is, that ...
0
votes
1answer
35 views

Batch zipping multiple files into a single archive

I have the following drag-and-drop batch script for creating zip files @echo off if [%1]==[] goto :eof :loop "C:\Program Files\7-Zip\7z.exe" a -tzip "%~1.zip" "%~1" shift if not [%1]==[] goto loop ...
0
votes
2answers
59 views

Recursive command-line md5 generator and verifier

I want to write a batch script that has the ability to generate and verify md5 hashes of an entire directory tree. Is there any program like this for windows? I can find many md5 programs, but they ...
0
votes
1answer
57 views

Windows 7 batch file to delete specified files in a path with spaces

I'm trying to get a batch to work but it seems it can't find the specified file. I'd like the batch to do the following: Kill my IP camera software Wait a few seconds to ensure the software has ...
1
vote
1answer
20 views

How to do multiple calculations with set /a in batch?

E.g. if I want to do the following calculation, how to make it work? set /A math=%%N+%code%+2*3/7
0
votes
0answers
25 views

windows batch iterate over files rename with 0 padding

i've been trying to make this little script. i basicly want to ask the user for a name, and then on that directory i rename all pngs to name+number, where the number is just a simple 3 digit iterator ...
1
vote
1answer
93 views

batch file for hardcoding subtitles in multiple videos with ffmpeg

My question at the top: What is the correct way to refer to a dynamic file name for the ass filter when using -filter_complex in ffmpeg? The story and my attempt: I have a folder that contains ...
0
votes
1answer
63 views

Batch File Won't Run - Command Line Script Does

I am using an ncftp script to upload some files via ftp. I want to automate this process so I am using a batch file to run it. Here is my script: ncftpput -u myusername -p mypassword -R myftpaddress ...
1
vote
1answer
36 views

How to Concatenate Repeating String in Batch Script

I'm trying to concatenate a repeating string depending on the first parameter value passed into the script when it is called. This value represents the number of directory levels the current ...
0
votes
1answer
93 views

Is there a way to kill explorer.exe and then run a batch file that starts it again?

Could this be done in batch or even in virtual basic? taskkill /IM explorer.exe /t /f & start bat.bat doesn't work.
1
vote
2answers
23 views

Print recurring lines of output to a text file

I want to write the following to a text file: a1 a2 a3 a4 a5 and so on until reaching a certain number of lines output. I have to type around 3500 similar lines. How do I automate this? I am ...