# this code is to change the contact name def changenamedata oldName = $addressfiles_directory + "/" + @a_viewnamedata + ".nam" if ! @a_changenamedata.empty? newName = $addressfiles_directory + "/" + @a_changenamedata + ".nam" File.rename(oldName, newName) oldphotoName = $addressfiles_directory + "/" + @a_viewnamedata + ".jpg" newphotoName = $addressfiles_directory + "/" + @a_changenamedata + ".jpg" if File.exist?(oldphotoName) File.rename(oldphotoName, newphotoName) end end end