1

I opened a file using Vim from MinGW's MSYS on Windows 7, and it crashed, and it's left behind a .filename.swp file which I cannot delete! I'm in the local admin group, and I tried following this, in an administrator command propmpt, and that didn't work. Nor did logging on as the local admin and performing the same actions. Any suggestions?

Update: From the console I get: "ERROR: Access is Denied" when executing takeown /f .filename.swp as an Administrator. When going through Right Click->Properties->Security, it comes up with something I've never seen before saying: "You do not have permission to view this object's security properties. To view it's security properties you can try taking ownership of the object..." When I do try, I get the same, unhelpful message: "Access is Denied". The only other interesting thing I can see is that under the "Current Owner" field it says: "Unable to display current owner.".

  • 1
    Hard to say without you telling us what the error is! – th3dude Apr 23 '10 at 18:46
  • Haha, woops. Brainfart's happen at 3am I guess :) Fixed now. – Adam C. Apr 23 '10 at 18:53
  • @Moab our usernames aren't even similar... – Adam C. Mar 27 '17 at 0:10
  • And the linked post was made 3 months later. – Adam C. Mar 27 '17 at 0:44
1

I always try to use an application called Unlocker first. This will attempt to unlock any restrictions currently on the file.

If that fails, then it sounds like you're basically locked out from doing anything in Windows. I would consider using some type of Live CD that will let you boot to a temporary OS and access your disc to delete the file.

  • Ahah! Cheers :) No context-menu entry was added for Unlocker, so I went looking for it in the process manager, and whilst there I saw vim.exe was still running, and ending that process got rid of the file. It's quite odd that it came up with "Access Denied" rather than that it was in use, maybe it's an MinGW MSYS/Windows integration problem? Very odd... Thanks for your help! – Adam C. Apr 23 '10 at 19:22
  • Welcome :) Glad to help – th3dude Apr 23 '10 at 19:25
  • Is there anything we can do in CMD? – Shimmy May 29 '17 at 20:50
0

Try Killbox - http://killbox.net/

.swp is a swap file - please be sure this is leftover from MSYS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.