|I actually wrote the wrong thing in my original post. I'm not trying to copy files to the profile, I'm trying to delete temporary files and clear the desktop, my docs, etc from a specific user profile on each computer. We have 1 user per computer(besides local and network admin users) going from johndoe1 to johndoe50. I have the batch code below that I use and it works but would like to have a generic file that can look up the usernames, pick out the johndoe user, and delete files from that profile. I used %username% and that works only for the user that is logged in but I need it to be able to run without being logged in. Sorry if this is confusing and jumbled but any help is much appreciated!|
echo y |DEL "C:\Documents and Settings\johndoe1\Desktop\*.*"
rmdir /s /q "C:\Documents and Settings\johndoe1\Local Settings\Temp"
echo y |DEL "C:\Documents and Settings\johndoe1\My Documents\My Pictures\*.*"
echo y |DEL "C:\Documents and Settings\johndoe1\Cookies\*.*"
echo y |DEL "C:\Documents and Settings\johndoe1\Start Menu\Programs\Startup\*.*"
echo y |DEL "C:\Documents and Settings\johndoe1\My Documents\*.*