Zend certified PHP/Magento developer

How do I create a new file (either .txt or .bat) in batch code that saves in a sub-directory in documents?

I am currently working on a batch program for a friend of mine that is going to be a tutorial for them once it’s all finished. However, I heard that it is possible and I would like this to be added to the code where the program creates a sub-directory in the Documents folder, another .bat file, adds a few lines of code to the new file, and opens the new file. I know that the creation of a Folder/File in the Documents can be done without knowing the username of that computer such as C:UserThomasDocuments, the code just drops the creation of the File/Folder in the user’s Documents bypassing that path. What code do I need to add to the program to make that happen?

P.S.

I would like to also open a particular folder with batch code as well.