This is a snippet of a Vendor server I just made for myself and partner. I'm not including the security encryption methods I use for obvious reasons, however this is what you are looking for:
touch_start(integer num)
{
llOwnerSay((string)llGetKey());
i = llGetInventoryNumber(INVENTORY_ALL);
for (x = 0; x<=i; ++x)
{
string current = llGetInventoryName(INVENTORY_ALL, x);
if (current != "" && current != "Vendor Server"

{
llOwnerSay("Processing inventory item: " + current);
inventory += llGetInventoryName(INVENTORY_ALL, x);
}
}
}
state_entry() {
//llEmail((string)llGetKey() + "@lsl.secondlife.com", "approved", "This is a test message."

; // Send email to self.
llSetTimerEvent(2.5); // Poll for emails. (Yes, that is a retarded way on an event-based system!)
}
timer() {
llGetNextEmail("", ""

; // Check for email with any sender address and subject.
}
email(string time, string address, string subj, string message, integer num_left) {
llOwnerSay("You got mail! " + (string)num_left + " more mails."

;
llOwnerSay(llList2CSV([time, address, subj, message]));
message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n"

+ 1);
if (subj != "" && message == "approved"

{
buyer = (key)subj;
llOwnerSay("Giving folder to: " + (string)buyer + llKey2Name(buyer));
llGiveInventoryList(buyer, llGetObjectDesc(), inventory);
}
else
{
llInstantMessage(buyer, "Sorry, you are not approved for purchase."

;
}
}
}
What this does is take everything in your inventory, put it in a list, then send it all to a buyer and using llGiveInventoryList forces a new folder to be created in their inventory - which in this case I have named "llGetObjDesc()" as it's simply handy to change the object's description and have it use that as the folder name.
NOTE: THIS IS NOT A SECURE VENDOR TO USE FOR SELLING YOUR ITEMS - I HAVE REMOVED MY PERSONAL ENCRYPTION INFORMATION FOR *MY* PROTECTION