Do you remember "what the folder WAS", when it still worked?
And WHERE it was?
In other words, can you still "find it using the finder"?
If you can then do this:
1. Go to the dock and RIGHT click on the ? folder
2. From the popup menu that appears, choose "options --> remove from dock"
3. The ? folder should disappear from the dock
4. Now, use the finder to open a window so that you can see the original folder again.
5. Next, click and "grab" the folder icon, and DRAG IT BACK TO THE DOCK
6. Does it go back into the dock?
7. If it does, click on it in the dock, and see if it opens to reveal what's inside.
If this works, you're done.
I've noticed that once in while (usually after doing cleaning or something) I will have a dock icon "go bad" on me (such as with the "?" in place of the icon).
Removing the bad icon from the dock and replacing it with a freshly-dragged one gets things working again.