Per Befehl anderen PC steuern

Etwas verfeinert.

::
:: This is a Windows Bathch script that can read a txt logfile an pass a Windows CMD to a remote computer
:: For example launch an Audio Allication on a remote Computer and pass over an Audio-File.
::
:: @package     
:: @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
:: @author      Malte Schroeder <post@malte-schroeder.de>
:: @copyright   Copyright (c) 2019 Malte Schroeder (http://www.malte-schroeder.de)
::
@echo off
setlocal enabledelayedexpansion
set _ver=0.0.2


:: Settings Area Changes on the script should only be required here
::-----------------------------------------------------------------
:settings
set _psexec=%SystemRoot%\System32\PsExec.exe
set _logfile=z:\logdir\transferfile.txt
set _remoteapp=C:\Program Files (x86)\Adobe\Adobe Audition 3.0\Audition.exe
set _remotecomputer=\\Nettop
 


::-----------------------------------------------------------------
:: End of Settings Area

:: make some nice Window Title
title Remote-App Launcher %_ver%
:: clear Varyable in case it is still existing from previous execution.
set _AudioFile=
set _error=

:errorcheck
:: let us check if all the files are available
if not exist %_psexec% set _error=%_psexec% does not exist. Make sure to install Sysinternals PsExec and Change the correct Path. && goto :error
if not exist %_logfile% set _error=%_logfile% does not exist. Make sure to have mAirlist output the File. && goto :error


:start
:: let us read the Filename
set /p _AudioFile=<"%_logfile%"
::let us check if the Audio File really exist, before we hand it over to the other computer.
if not exist %_AudioFile% set _error=%_AudioFile% does not exist or wrong Logging Parameter is set in mAirlist. && goto :error
echo %_psexec% -i %_remotecomputer% "%_remoteapp%" "%_AudioFile%"
pause

goto ende

:error
:: Something went wrong so let us inform the user.
echo %_error%
pause


:ende
endlocal
exit

EDIT: Übrigens die entsprechenden Log-Einstellungen sind hier: Playlist aktuell gespielter Titel immer oben im Playlistfenster Nur der Haken: Datei bei jedem Logeintrag überschreiben muss rein.
Für den nächsten oder den übernächsten, entsprechend %+1 oder %++1
https://wiki.mairlist.com/reference:logging_variables#subsequent_items