We did this in our old house with the main floor closet, because it didn't have a door and we were renting, so we didn't want the expense of purchasing something that we would be leaving behind.
We used a spring loaded rod (like one that you would get for a shower curtain) and I sewed a curtain for it with a tabbed pocket. It held up quite well, didn't damage the walls, and I was able to find a new use for the fabric when we moved to a new house.
I'd highly reccommend the type of setup that Thalia posted, with the wire hanger and the rivted (is that the right term) holes. It'll help with sliding the "door" open and closed. That was the one issue we had with ours. It didn't slide back and forth very easily, so we had to kind of pull it to one side to access the closet. Not a big deal, because it was a narrow closet, but I could see it being an issue for a larger bedroom closet.