Need to change default phone monitor recording location

I have several scripts written for trixbox 2.6(and change)that ftp files from the /var/spool/asterisk/monitor directory. I have recently started using FreePBX 2.11 and the default location for the files has changed to include a directory for the year, month, and day rendering my scripts useless.

How can I change the default location for the phone recordings back to the /var/spool/asterisk/monitor directory?

You can’t, and it would break the ARI and CDR ability to display recorded calls.

I would change your script.

I’m pretty new to scripting. Is there a simple way to move all that are in the subdirectories below var/spool/asterisk/monitor, and move them back to the monitor directory?

Found the answer. Just added into my current script: