GSM SHIELD 2 AT COMMANDS TO CLEAR SIM MEMORY

Hi,

I am using the GSM shield2 with the GSM lib, everything works fine but i need to clear the sim memory as its filling up. The standard fulsh() call does not do this.

I have found this code by searching the forum

sms.print("AT+QMGDA="");
delay(5);
sms.println("DEL ALL"");
delay(300);

These are the correct AT commands to clear the SIM, however i am not sure that sending them via sms.print will make them readable by the modem as commands rather than just text to send as a sms ?

Is this the correct way to send AT to the sms lib and ultimately to the modem ?

i have also seen the following call being suggested to send AT to the modem, however not sure if this is correct for sms ?

theGSM3ShieldV1ModemCore.println("");

Thanks