our users have their c:\temp folder cleaned everytime they login. This folder (and/or subfolders) may sometimes contain files that are in-use/locked by the OS. Up until now we used deltree.exe to clean up this folder. The program simply skipped the locked files.
With the introduction of W7 X64, deltree no longer functions. Some googling pointed us to del3.exe as alternative. Unfortunatly, this program exits after the first locked file/folder.
As our login script is VBS based, I'm looking for a procedure that can delete all files and subfolders in any given folder, skipping locked files/folders.