Grazie mille per l'aiuto.
Grazie al tuo script sono riuscito a risolvere il problema