Batch Script Not Only Enumerates User Profiles But Also Shows How to Error-Proof Paths
By using GetUserProfiles.bat, you can clean up old user profiles. By looking at how it works, you can learn how to error-proof paths. No matter whether you use this script for one or both purposes, it can be a valuable tool.
February 1, 2008
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.
About the Author
You May Also Like