I few weeks ago I came here to ask for help. I wanted to run MediaInfo CLI from the sendTo contextual menu. From the send to menu is easy, just place the batch script in there.
But I wanted to have the nfo created be the default one, but just with the file name and not the path in the general part of the nfo.
I got 4 versions of it, 2 for a single file (without the path in the file name and with only the folder containing the file) and 2 for all the files in the folder (only name and only parent folder and name too):
This code here is to create nfo's for all files in the folder (without the path in the name in the general part of the nfo)
How could I make it so that instead of making an NFO for every single file, to make a single nfo for all of the files.Code:@echo off for /r %%a in ("*.mp4", "*.avi", "*.mkv") do call :process "%%a" Exit :process %~d1 cd "%~p1" "C:\Program Files\MediaInfo_CLI_21.09_Windows_x64\MediaInfo.exe" --LogFile="%~dpn1.nfo" "%~nx1" goto :eof
As i'm writing this, I'm thinking a solution would be to run something at the end of the script that takes all nfos and groups them ?
Any ideas how I could achieve that?
Thanks for your help
+ Reply to Thread
Results 1 to 5 of 5
use >> to append the output of each mediainfocli call to the same file.
@echo off for /r %%a in ("*.mp4", "*.avi", "*.mkv") do call :process "%%a" Exit :process %~d1 cd "%~p1" "C:\Program Files\MediaInfo_CLI_21.09_Windows_x64\MediaInfo.exe" "%~nx1" >>MediaInfoAll.txt goto :eof
You may want to delete MediaInfoAll.txt before starting the for loop -- in case there's one there already.