How about something simple like:<br><br><br>#!/usr/bin/perl<br><br>&nbsp; use strict;<br>&nbsp; use DBI();<br>&nbsp; my $path = &quot;/var/lib/mythtv/recordings/&quot;;<br>&nbsp; my $username = &quot;mythtv&quot;;<br>&nbsp; my $password = &quot;&quot;;<br>
&nbsp; my @files;<br>&nbsp; my @recorded;<br>&nbsp; my $line;<br>&nbsp; # Connect to the database.<br>&nbsp; my $dbh = DBI-&gt;connect(&quot;DBI:mysql:database=mythconverg;host=localhost&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $username, $password,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&#39;RaiseError&#39; =&gt; 1});<br><br><br>&nbsp; # Now retrieve data from the table.<br>&nbsp; my $sth = $dbh-&gt;prepare(&quot;SELECT basename FROM recorded&quot;);<br>&nbsp; $sth-&gt;execute();<br><br>&nbsp; while (my $ref = $sth-&gt;fetchrow_hashref()) {<br>
&nbsp;&nbsp;&nbsp; push (@recorded, $ref-&gt;{&#39;basename&#39;});<br>&nbsp; }<br>&nbsp; $sth-&gt;finish();<br><br>&nbsp; # Disconnect from the database.<br><br># Get listings from $path<br>@files = `ls $path | grep -v .png | grep -v .lock`;<br>foreach $line (@files) {<br>
&nbsp; chomp $line;<br>&nbsp; print &quot;$line\n&quot; unless (grep (/$line/, @recorded));<br>}<br><br><br><div class="gmail_quote">On Feb 9, 2008 1:11 AM, Michael T. Dean &lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">On 02/08/2008 07:15 PM, Mike Smith wrote:<br>&gt;&gt; You could use <a href="http://myth.rebuilddatabase.pl" target="_blank">myth.rebuilddatabase.pl</a> to identify files that aren&#39;t in<br>
&gt;&gt; the DB. &nbsp;Whether it will still work to put them there is another<br>&gt;&gt; question, though. &nbsp;I&#39;d copy the filename it mentions, then tell it to<br>&gt;&gt; ignore the files.<br>&gt; find_orphans is apparently what I used last time, but the only version I can<br>
&gt; find now is updated to work with storage groups and doesn&#39;t work on 0.20.<br>&gt; Anyone out there have an older version?<br><br></div></div>Did you try running <a href="http://myth.rebuilddatabase.pl" target="_blank">myth.rebuilddatabase.pl</a>?<br>
<div><div></div><div class="Wj3C7c"><br>Mike<br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br>
</div></div></blockquote></div><br>