Delete 5 days older files from sftp

As one of our requirement was to connect to remote Linux server through SFTP connection and delete some files which are older than 7 days.

I used the below piece of code for that,

SFTP_CONNECTION=`sftp user_id@host ... 
cd DESIRED_DIR;
find /path/to/files* -mtime +5 -exec rm -rf {} \;
bye
END`

But unfortunately, "find" command does not work with "SFTP" connection, and as a result, iam unable to remove files from remote server.

I even can not use "SSH" for security purpose. And the script is fired from "ksh".

So my question is, how can we delete files from remote server through "SFTP".

Or, is there any alternative command of "ls" which does the exactly same thing as,

"find /path/to/files* -mtime +5 -exec rm -rf {} \;"

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.