GetUserProfiles.bat uses the NetUsers tool to enumerate user profiles on PCs. This list of user profiles can be helpful, especially if you need to clean up old user profiles on shared PCs or locate all the PCs a specific user has logged on to for security reasons. Even if you don't need to enumerate user profiles, GetUserProfiles.bat is valuable in that it demonstrates how to error-proof paths. Script errors are often caused by problems with pathnames to input, output, and utility files.
To learn how to error-proof paths and download GetUserProfiles.bat, read Dick Lewis' article "Learn How to Error-Proof Paths and Creatively Manipulate Strings." I've opened up this article for public viewing through March 6. If you enjoy reading this article, you can get more of this type of content by subscribing to Scripting Pro VIP.