Don't know about doing it purely in a batch file, but if you install
perl you can certainly use that. This is what I use to trigger a
rescan:
Code:
--------------------
use IO::Socket;
$server="squidward";
$port=9090;
print "Connecting to SlimServer at ".$server.":".$port."...\n";
$remote = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $server,
PeerPort => $port,
)
or die "ERROR: Cannot connect to SlimServer";
$remote->autoflush(1);
print $remote "rescan\n";
$response = <$remote>;
$response eq "rescan\n" || die "ERROR: Bad response from SlimServer :
$response\n";
print $remote "exit\n";
close $remote;
print "SlimServer is rescanning the music library\n";
exit;
--------------------
Throw that in a .pl file and you can call it from a batchfile or just
by double clicking.
--
radish
------------------------------------------------------------------------
radish's Profile: http://forums.slimdevices.com/member.php?userid=77
View this thread: http://forums.slimdevices.com/showthread.php?t=25850
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss