Sheridan Posted October 21, 2019 Posted October 21, 2019 Got a weird thing happening with a server recently. We have a file that is copied over every night with a batch job - it deletes the old file in a shared folder and replaces it with a new one The shared folder is readable by users, and has r/w for admins and the user account that the jobs runs under. This has worked fine for years, but recently the job fails as it says the file is open somewhere else. When I check the open files list on the server I can see a few Read's all with 0 locks, which has always been the case. There's nothing that seems to have a lock on the file, so I'm puzzled as to why its become undeleteable (is that a word?!) recently.
6Foot2 Posted October 21, 2019 Posted October 21, 2019 When I can't delete user profiles because admin does not have the rights () I use Robocopy to copy a dummy (empty) folder over the recalcitrant, troublesome profile folder and then I delete the dummy folder. Works every time for me: Perhaps Robocopy could help with your problem? Link: Learn how to use the robocopy command in Windows and Windows Server to copy files [Micropsoft.com] 1
Sheridan Posted October 21, 2019 Author Posted October 21, 2019 Hmm I might try that, at the moment I'm just using the openfiles to close an instances of that file, but it doesn't always close all of them
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now