Using batch in this way to hide files is just stupid. If you really must hide the files then here is a batch that may help:
http://www.lytebyte.com/2007/06/25/how-to-lock-and-hide-folders-in-windows-without-additional-software/
I just love it how people say don't do that its stupid, just do something else. It never fails to amaze me. Anyway I see you are writing a batch file because its fun and something you can be proud of thats why you call it a pet project which is just that.
Sorry for any confusion, I don't mean to start a flame war here. I was
not meaning to imply that the OPs desire to use a batch script to perform this task was stupid. I meant that the methods they were employing to do so are not necessarily the most practical or effective.
The link I suggested was simply to showcase other methods that could be used. They could try and figure out how that works, it's a far more effective method of achieving the task at hand. Feel free to use your own methods if you deem them more appropriate, or would like to experiment. It's always YOUR choice, not ours.