Sparky28 Posted October 12, 2017 Posted October 12, 2017 Hi all Bit of a newbie here so please bear with me... We have a folder on our server (Server 2012 R2) that simply will not be deleted. The file is on a network share and is called 'We are photographers'. The file is empty. When I tried previously to delete it I got the error that the directory could not be found. However, it was right there in front of me. I used cmd to navigate to the directory and used the dir /x command to list all files. It appeared as listed there too. I then tried the rmdir /q /s command to delete the folder as follows: rmdir /q /s We are photographers rmdir /q /s "We are photographers" Which both returned the error: "The system cannot find the file specified". I tried looking for the short name which I guess would be something like "Wearep~1". However, on the server no short names are listed when I type dir /x, only the long file names. I also tried renaming the file but didn't have much luck there either. Now when I try to delete the file (logged on as admin) I get no error - only 'Are you sure you want to delete this file?' and then nothing happens and the file stays there. I'm actually worried that we have some corruption as there are roughly 10-15 folders that windows is unable to find, however the files inside them are intact. Any ideas? Thanks much for all your help. Mark
Michael Posted October 12, 2017 Posted October 12, 2017 Try renaming the folder paths shorter. I wonder if you're hitting the 256 character limit?
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 (edited) Hi Michael. Thanks for getting back to me so quickly. We also have a folder called 'Evidence Video' that appears to be corrupt. It is in the following location: D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video I tried renaming it manually but got the following error: "Could not find this item. This item is no longer located in D:\Shares\Teachers-Shared\Planning Archive\Computing\. Verify the items location and try again". I have also tried renaming the file using cmd but the syntax is wrong: I'm not that great with cmd... Edited October 12, 2017 by Sparky28
Jawloms Posted October 12, 2017 Posted October 12, 2017 You could try sharing the "Computing" folder and then mapping a drive to it, then trying to delete it?
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Jawloms Thanks for replying. Sorry, I don't quite follow... The computing folder is already shared, however, there is no drive mapped directly to it. Not sure quite how to proceed as I don't want to delete the folder. If I map it to a drive - how will I delete it? Thanks, sorry for being dense... Mark
Jawloms Posted October 12, 2017 Posted October 12, 2017 You said the path is "D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video". If you can map a network drive to the "Computing" folder then the path will only be "X:" giving you a shorter path and possible the ability to delete what you need.
ollyyllo Posted October 12, 2017 Posted October 12, 2017 (edited) Hi Sparky28 Try the renaming like this ren "D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video" ev Because you have a space at 'Evidence Video', you need quotes around the path. Edited October 12, 2017 by ollyyllo
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Jawloms, Sorry, I get you now. Needed another coffee! I tried mapping it to Y: Y:\Evidence Video Still no joy... "The system cannot find the file specified" or "Could not find this item. This item is no longer located in Y:\ Verify the item's location and try again." Mark
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Ollyyllo Thanks for the tip. I tried that, no joy either. Same error... Mark
andydis Posted October 12, 2017 Posted October 12, 2017 try attrib "D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video" -r -a -s -h
Michael Posted October 12, 2017 Posted October 12, 2017 Is it possible an application or a service of some kind is using the directory, hence why it cannot be renamed, moved or deleted as it's in use?
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Thanks Andy - gave it a go but got the error: File not found - D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Michael I don't think anything is. Other folders in the computing folder can be renamed and deleted okay. Just specific ones that can't. I there anyway I can check to know for sure nothing is using that specific folder? Thanks for you help. mark
Michael Posted October 12, 2017 Posted October 12, 2017 Just unshare it. If something stops, re-share it.
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 (edited) One thing, I am using the back up software - Duplicati to copy across all photos and videos to our back up server on our network and it appears to be some of these files that are affected. It's free software and can be a bit flaky. In fact it was the errors in the Duplicati log that made me investigate the folders in question... I wonder whether that has got something to do with the problem? Mark Edited October 12, 2017 by Sparky28
ollyyllo Posted October 12, 2017 Posted October 12, 2017 If you go to Computer Management - Shared Folders - Open Files, that might give you some indication if it is open.
Michael Posted October 12, 2017 Posted October 12, 2017 Be interesting to see what the logs are saying.
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Nothing unusual relating to the folders in Computer Management. Michael, by logs do you mean Event Viewer? I there an easy way do upload them? Mark
Michael Posted October 12, 2017 Posted October 12, 2017 Just curious what the logs are saying from your backup application. It may be useful, but it may be not. Especially error codes. Usually yes, it should log events in Event Viewer.
andydis Posted October 12, 2017 Posted October 12, 2017 try this for me d: cd D:\Shares\Teachers-Shared\Planning Archive\Computing\ dir enter (screenshot output) cd (type v and then hit tab) - does it shows "video evidence"
Koldov Posted October 12, 2017 Posted October 12, 2017 Have you rebooted the server lately? iirc I had some folders/files that would not delete/rename, even using the 7zip trick. When I rebooted they were actually gone, for some reason the server was just unwilling to let them go....
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Andy Here's a screenshot: Don't follow you on the second part "cd (type v and then hit tab)", sorry. Thanks again everyone for all your help...
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hey Koldov, Last time the server rebooted was 2 days ago - problem was from before then... Thanks for the suggestion. Mark
Sparky28 Posted October 12, 2017 Author Posted October 12, 2017 Hi Michael Here is the error from the back up application: Error reported while accessing file: D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video \ System.IO.FileNotFoundException: Could not find file 'D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video\'.File name: 'D:\Shares\Teachers-Shared\Planning Archive\Computing\Evidence Video\' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.GetAttributes(String path) at Duplicati.Library.Snapshots.SystemIOWindows.GetFileAttributes(String path) at Duplicati.Library.Utility.Utility.d__23.MoveNext() Mark
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