When grinding nuts, you need to take some extra care or you may wind up with nut butter.
Many sweets call for ground nuts. Here's a trick: If you're using a blender or food processor, add 1 tablespoon of the sugar or flour from the recipe for each cup of nuts. (It helps absorb some of the oil.) Use a quick start-and-stop motion for better control over the fineness of the nuts. For best results, grind the nuts in small batches.