<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2>Rusty,</FONT></SPAN></DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2>Thanks for your response. Yes the variables were defined and the
FIND works ok without the -exec rm since I tested its results by writing the
FIND<SPAN class=078544614-03012006>'</SPAN>s results to a file, so I think the
problem lies with the rm. </FONT></SPAN></DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937212114-03012006><FONT face=Verdana color=#0000ff
size=2>Bill</FONT></SPAN></DIV></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Rusty Dekema
[mailto:rdekema@gmail.com]<BR><B>Sent:</B> Sunday, January 01, 2006 2:30
PM<BR><B>To:</B> Asterisk Developers Mailing List<BR><B>Subject:</B> Re:
[Asterisk-Dev] Question on using system(find args -exec rm {} \;
)<BR><BR></FONT></DIV>This is kind of obvious and is probably not the cause of
your problem, but it has tripped me up from time to time when trying to code
things in the Asterisk dialplan. Are you sure that the two variables you
reference <FONT size=2><SPAN><FONT size=+0><SPAN><FONT face=Verdana
size=2>(${PathRecordingTemp} and ${CUSTNUM}) have been defined and hold the
correct values before you try to reference them in your system call?
<BR><BR>Just a thought; I don't see anything wrong other than that.
<BR><BR>-Rusty<BR></FONT></SPAN></FONT></SPAN></FONT><BR>
<DIV><SPAN class=gmail_quote>On 12/30/05, <B class=gmail_sendername><A
href="mailto:bday@prosodiemail.com">bday@prosodiemail.com</A></B> <<A
href="mailto:bday@prosodiemail.com"> bday@prosodiemail.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><FONT face=Verdana size=2><SPAN>All,</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Verdana size=2><SPAN>I am using Asterisk 1.0.7 and having a
problem using system(find ... -exec rm .. ) application as
follows.</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN>
<DIV><FONT face=Verdana><SPAN>I<SPAN>'</SPAN>m trying to perform a system()
application in my dialplan to </SPAN><SPAN>remove all files that are older
than 2 days. I get a n+101 error using the following syntax<SPAN>
(yes, there are files in this directory older than 2 days)</SPAN> and
was wondering if you see any obvious mistakes in my syntax?
</SPAN></FONT></DIV>
<DIV><FONT face=Verdana><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Verdana><SPAN>The command works ok on the C<SPAN>ommand
</SPAN>L<SPAN>ine</SPAN>, but not inside my dialplan. I've researched
a number of resources and the only thing I can find is in the GNU man pages
for FIND where it mentions that I might need to escape the args for the
-exec, but I've tried all the escape combinations with no
success! The FIND works ok without the -exec so I have
focused my troubleshooting to the -exec portion. Any
suggestions?</SPAN></FONT></DIV>
<DIV><FONT face=Verdana><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Verdana><SPAN>;this finds & removes all files in
specified directory that are older than 2 days</SPAN></FONT></DIV>
<DIV><FONT face=Verdana><SPAN><SPAN></SPAN></SPAN></FONT> </DIV>
<DIV><FONT size=+0><SPAN><FONT face=Verdana size=2>exten =>
s,2,system(find ${PathRecordingTemp}/${CUSTNUM} -mtime +2 -maxdepth
1 -exec rm {} \;) </FONT></SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV></DIV></SPAN></FONT><SPAN><FONT face=Verdana
size=2>Thanks</FONT></SPAN></DIV>
<P><FONT face=Verdana color=#000080 size=2>Bill DAY- SW Engineer</FONT>
<BR><FONT face=Verdana color=#000080
size=2>---------------------------------------------</FONT> <BR><FONT
face=Verdana color=#000080 size=2>PROSODIE Interactive</FONT> <BR><FONT
face=Verdana color=#000080 size=2>Phone: 954-671-6532<BR><FONT face=Verdana
color=#000080 size=2>Fax: 954-343-5684</FONT></FONT><BR><FONT face=Verdana
color=#000080 size=2>Corporate: 1-866-PROSODIE</FONT> <BR><FONT face=Verdana
color=#000080 size=2><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:bday@prosodiemail.com"
target=_blank>bday@prosodiemail.com</A></FONT> <BR><FONT face=Verdana
color=#000080 size=2>---------------------------------------------
</FONT><BR><FONT face=Verdana color=#000080 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Verdana"><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.prosodieinteractive.com/"
target=_blank>www.prosodieinteractive.com</A><FONT face="Times New Roman"
color=#000000 size=3> </FONT></SPAN></FONT></P>
<DIV> </DIV><BR>_______________________________________________<BR>--Bandwidth
and Colocation provided by <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://Easynews.com" target=_blank>Easynews.com</A>
--<BR><BR>Asterisk-Dev mailing list<BR>To UNSUBSCRIBE or update options
visit:<BR> <A onclick="return top.js.OpenExtLink(window,event,this)"
href="http://lists.digium.com/mailman/listinfo/asterisk-dev"
target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-dev
</A><BR><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>