Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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 :D

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...