In the scriptcenter of MS I found a little script to remove all files from a dir. It works perfect except when there are files in that dir that are in use. in that case the script crashes with a RT-error: Access Denied - code 800A0046.
The dir where I need the script for, must be cleaned up every day but there are always files in use. Could soneone help me to modify the script so that ik will cleanup all files except those who are in use.
This is the script I've used:
Const DeleteReadOnly = TRUE
Set objFSO = CreateObject("Scripting.FilesSystemObject")