Delete user's Temp files
Every now and then I have the need to perform a simple task across a large number of PCs. This could be rolling out an update of Flash or updating a registry entry. All of this is made simple by having some desktop management software like Altiris or Landesk to hand. Write a quick script to run a silent install or import the registry settings in silent mode and job done. However occasionally you come a across a desire that is little more difficult to fulfill. This normally involves applying a registry entry or deleting a folder in all of the user profiles on a PC. This is often trickier than it first seems. For example say you wanted to empty the temp folder in every user's profile. If you want to delete all files that have a .tmp extension anywhere on the C: drive then you can simple run the following Del C:\*.tmp /s Simple, job done. But when you want to delete all the files in the Temp folder that appears in C:\Documents and Settings\ Username\ Local settings\Temp. The ...