You have to target each object and hold that for 2 seconds. The most difficult part is targeting the cargo as they are so close together and you can't get close to distinguish easily. My method is to use either the "n" (newest arrival) or "u" (next unscanned). The tricky part is once you've held it for the required 2 seconds, it starts back at the beginning of the queue so you need to cycle through the ones you've already targeted. The useful thing to remember is the long time it takes for the freighters to arrive and deposit the cargo gives you ample time cycle through the cargo. You can even start targeting as soon as they arrive.