use the mediainfo output as a variable in another command

So I'm trying to setup an easy way of starting videos with a bat file, and having that run Mediainfo first to get the length of the video so it can then stop vlc or whatever else when it's done playing. Complete name : C:\Users\Tyler\Desktop\Psych s0

Rename the first part of the file name using the batch

I have some problem writing a code for a batchfile that will replace the first part of a file name. let say we have the files: abcd123.txt abcd345.txt the numeric part(and the extensions) is the part I want to keep and change it to blabla123.txt and

Use find to return only the number

I have an external process which essentially needs to call: int myInt = exec('find /v /c "" filepath'); It's counting the number of lines in a text file. If there's a better way to get the integer amount that'd also work great. With find, the fu

Windows Batch, split file by delimiter, refinement

I have a folder full of text files that I need to split based on the (optional) presence of a delimiter. I found an answer for how to actually split the file here: Split text file into 2 files by separator @echo off&setlocal set "

Deleting the PATH path from the system in a batch script

I am trying to remove a variable path from the system's PATH environment variable from within a batch script. For example, if MY_DIR=C:\MyDir, I want to remove MY_DIR from PATH. I've tried setlocal EnableDelayedExpansion call setx /M PATH %%PATH:%MY_

Modifying paths in Python

I'm trying to create a program that duplicates itself to another location and creates a batch file on the desktop. I can make it duplicate itself and I can create the batch file but I need some help with the paths. I can find the path that my program

Have a learn batch program

I am making a chat bot for my sister in batch but it is consuming so much time I figured I would let it have her tell it what to say when it does not know. However I can not get it working and I figured someone on here might know. Here is what I have

Batch sending output to null does not work

When I run this code if there is no Num.txt it says that it cant find the file. how do i stop it from saying this i have tried >nul but it doesn't seem to be making any difference. @echo off for /f "delims=" %%x in (Num.txt) do set "d=%%

Make any command in CMD works in a .BAT file as a .EXE file

Redirecting CMD Commands To An EXE File Long story short, basically I have the problem that every time I run BCDedit on the .BAT that I converted into an .EXE it never worked and I thought that the reason why it wasn't work was because it wasn't on P

Defining variables in the batch variables

I'm trying to efficiently name variables a1 through a9 with !%f%! through !%q%!. I tried creating a for loop to complete this: set w=0 for %%K in (f g h i k l m o q) do ( set /a w+=1 set /a b%w%=%!%%K!% set /a a%w%=!b%w%!%%13 ) The error is that ther

separate a variable with a symbol into different parts

using batch, i want to be able to separate a variable into two or three parts, when there is a symbol dividing them. for example if i have the string which looks like this: var1;var2; how can i get var1 to become variable and var2 to become a differe

How to pass the additional -D parameter when starting tomcat?

I have a maven project, after running command mvn install all project as well as module compile and copied to local repository successfully. But now I want to run the generated web application in tomcat6. Client provided some parameter for tomcat lik

create a folder with a user-defined name in the batch

I need a batch code, where if I enter a number "11" and then a text "ss" then it should create a folder name as "11-ss", within the folder I need 3 folders named 1, 2, 3. Is it possible? mkdir %1-%2\1 mkdir %1-%2\2 mkdir %1-%

Adding batches from the file (+1) Rewriting

I'm making a batch game, that counts a highscore in a separate file called "Score.txt". In that file, it reads a number, but when you win the game I want it to be overriden with the next highest number. E.G... 0 is the number, I won the game, no

call C # exe from the command line using the command file

I want to create an exe file using C# which will send emails. I want to invoke this exe using batch file. Should I create a Web form application or just a class library ? Can an exe be called using batch file from command prompt? Please suggest.Typic

Close a running application from the DOS command line

The start command can launch an application like notepad in a batch file like this: start notepad start "my love.mp3" But how do I close the running application from the command line? I found taskkill in my searches but I don't think that is the

Help with batch files

What are batch files useful for? They just seem to be used to make viruses and other things...but it seems like shell scripting to me. Whats the uses for batch files?From Batch file article at Wikipedia: Batch files are useful for running a sequence

How can I use VB.NET to run a batch file on another computer?

In 2008 I want to execute a batch file that resides on another computer. There is no error, but nothing happens. Here is the code: Dim pStart As New System.Diagnostics.Process Dim startInfo As New System.Diagnostics.ProcessStartInfo(serverpath