That will return "Yep" if the folder exists, and "Nope" if the folder doesn't exist. You can put something else in place of the echo commands, if you want.
This, of course, isn't foolproof. If a user moves the folder you'll get "Nope" even if the applications exist elsewhere on the computer. Similarly, if someone deletes all the applications from that folder, or if they just create an empty folder named "Microsoft Office 2011" inside the Applications folder, the command will return "Yep". These scenarios are unlikely but possible.
You're welcome. I accept PayPal donations. ;o)
_________________________ Subscribe to MacTech Live — Official Podcast of MacTech Magazine