I've seen this problem, and it's origin and resolution is kind of a puzzle. Many people have had this problem and there are multiple solutions which seem to have worked for them. Try these (reboot between each and try deleting your files)
1) Do a "chkdsk /f /r C:" at an administrative command prompt, allow it to run and finish (make take some time)
2) Defrag the hard drive using the Windows defrag tool
3) Run "sfc /scannow" at an administrative command prompt
4) Run "DISM /Online /Cleanup-image /Restorehealth" at an administrative command prompt
Would be interested in knowing which if any of these steps has resolved the issue for you.
So, it just logs you off and logs you back on? Is that what you mean?
By the way, I have heard about the method of defragment and optimize drives. I optimized the storage (for mines, it's HP (C). And I've waited (yesterday) for like 5 hours. And I've wondered, how long is it suppose to take? Also, is it good to use this method? The steps for this method is.....
Step 1: Search for Defragment and Optimize Drives and then open it.
Step 2: Click on whatever storage drive you are using.
Step 3: Then click optimize
Step 4: Wait until this is finished then restart you computer.