ya lo hice, con el script readdir me tomo y pude hacerlo garcias todos por responder
saludos y muchas grax