[RDP] rdimport scripts

Jay R. Ashworth jra at baylink.com
Mon Oct 15 14:47:48 EDT 2007


On Thu, Sep 27, 2007 at 09:10:29PM +0200, Vegard Svanberg wrote:
> * Brooks Whiteford <bwhiteford at gmail.com> [2007-09-26 23:55]:
> >    Hey guys, is there a way to have rdimport go recursively through
> >    directories and import music instead of having to be in the directory
> >    when running it?
> 
> You can use find:
> 
> find . -iname *mp3 -exec rdimport groupname \{\} \;
> 
> (Use . (dot) if you want to descend from the current directory. Else use
> "/path/dir".)

Note that if you have a whole lot of files, that's usually pretty
inefficient.  If rdimport accepts multiple arguments, then

find . -name *mp3 -print0 | xargs -0 rdimport groupname 

will probably work better.  You may need to escape the * in *mp3, and f
your find is too old it won't have -print0, in which case you can use
-print and drop the -0 on xargs.

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274


More information about the Rivendell-prog mailing list