mdrabble Posted September 10, 2021 Posted September 10, 2021 I am trying to delete a user and for some reason there are some files which windows is either refusing to see and delete. I have a file called ~$ which I can only view via dos and dir /ah when I try and rename, delete, change attributes it tells me ~$ does not exist. I have another file called cw which windows can see but when I try and delete the file Windows tells me the file no longer exists. I've tried rebooting the server with no luck..... any other suggestions on how I can remove these files? Cheers
TwistedHelixis Posted September 10, 2021 Posted September 10, 2021 I had something like this a while back but couldn't delete the folder with the file inside, simply dragging the folder (with the file in) to another location was enough to let me delete the folder.
mdrabble Posted September 10, 2021 Author Posted September 10, 2021 Just tried that and it a no go I'm getting "This file is no longer located in pathname. Verify the items location and try again. Just running an error check on the drive to make sure it is ok - but very puzzling.
TwistedHelixis Posted September 10, 2021 Posted September 10, 2021 I would try to delete them using CMD or power shell next.
Koldov Posted September 10, 2021 Posted September 10, 2021 Seem to remember having some files do the same but can't remember how I fixed it now... I could see the file but Windows refused to acknowledge it existed! If I'm honest I think they eventually just disappeared and after a week or so I forgot all about them. I take it there is no extension on this file (and you have view extensions turned on)? Can you view its properties, take ownership of it or add an extension (.docx or something)? I regularly run this in the holidays with the wildcard for the extension (admin cmd prompt on the server): dir /ah /s e:\~*.* (where e:\ is the drive with the files on our file server) these are mainly the usual temp files Office creates when a file is opened then del /ah /s e:\~*.* (but it seems you've already done this) The other thing I've had success with is 7-zip (for path too long etc.) might not want to install it on your server, but you could navigate from a client.
Chaniel Posted September 10, 2021 Posted September 10, 2021 If I ever get hassle deleting a folder/file, I just use robocopy to delete it. Make an empty folder (e.g. C:\empty) Robocopy c:\empty /mir /L The /L switch will list what will happen (Basically a WhatIf) without doing any harm. /MIR could really ruin your day if you entered a path wrong so I always verify first. After verifying you didn't type the path wrong, just run it again without the /L switch.
mdrabble Posted September 10, 2021 Author Posted September 10, 2021 Wow that was more painful that it should have been! Tried using CMD and PowerShell both insisted the files didn't exist. Opened 7zip - wouldn't let me delete them straight off - had to rename them in order to delete them. Cheers for hints and tip
Oaktech Posted September 10, 2021 Posted September 10, 2021 I tend to use IOBit unlocker and they don't put up too much of a fight...
round2it Posted September 10, 2021 Posted September 10, 2021 (edited) try installing 7 zip and delete them through that http://www.edugeek.net/forums/windows-server-2008-r2/177342-delete-pesky-files-windows-cant-using-7zip-filemanager.html Edited September 10, 2021 by round2it
andy_b Posted September 10, 2021 Posted September 10, 2021 Often get a problem like this when people manage to create a file with a space at the end (i.e. after the file extension). Usually they have created the file on an iPad, Windows allows the file to exist (and will show the space) but refuses to delete it. Most reliable way to delete has been a rename in 7Zip and then a normal delete.
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