0

so I have written a batch that worked as I intended to. After I rebooted my windows however, I ran the batch again, and for some reason it wouldn't work anymore.

After breaking it down, eliminating/simplifying some code I found out that the problem has something to do with the MediaInfo CLI. Here's the full code of the batch:

@echo off
set MEDIAINFO=C:\Progra~1\MediaInfo\MediaInfo.exe
set TEMPLATE=H:\test\Audio.txt

%MEDIAINFO% --Inform=file://%TEMPLATE% test.dts >H:\test\test.txt
pause

The template (Audio.txt) just contains:

Audio;%BitRate/String%

So as you can see, I broke it down to be super basic; and it even worked again after some time - without changing anything -, but after I rebooted again, it didn't work.. So, I know this sounds odd, but something must have triggered it to work again. I have no clue what that might have been though.

I'm pretty confused as to why this is happening, so any help would be much appreciated.
PS: Sorry if my grammar might not be correct, but English is not my native language.

7
  • 1
    What was the failure behavior? Were there any specific error messages? Aug 13, 2015 at 18:37
  • What appears when you remove the @echo off line?
    – lit
    Aug 13, 2015 at 19:03
  • 1
    When the machine restarts, are you sure that the H: drive letter is mapped. Before running the script, use NET USE to see if it is connected.
    – lit
    Aug 13, 2015 at 19:04
  • @DavidRuhmann: No error messages. Just an empty output file is created (test.txt) Aug 13, 2015 at 19:09
  • @Paul : When I remove the @echo off line, everything is printed with paths just as normal. And yes, H: is mapped. Also tried it on different drives. Last time I rebooted the computer was ~30 minutes ago, still not working, so whatever is triggering it to work, I did not trigger it yet. Aug 13, 2015 at 19:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.