Dim fso As New FileSystemObject fso.CopyFile "c:\syslog.txt", "d:\", True fso.CreateFolder "d:\new folder" fso.MoveFile "c:\rubbish.txt", "d:\" fso.DeleteFile "d:\rubbish.txt", True Set fso = Nothing
I've never tried deleting a locked file. You will want to run your program before windows starts to delete such files. But there's a VC++ example for a forcedel at codeguru.com that claims to do it. Maybe you can port it VB.Is there any way to delete a locked file?
Like I said, use one of these methods:What is the best way to search a file?