Solved

Cannot delete file: Cannot read from source file or disk.

Posted on 2008-10-08
18
1,273 Views
Last Modified: 2012-08-13
I am attempting to delete a folder on a windows server 2003 system.

If I attempt to delete the file I get an error: "Cannot delete file: Cannot read from source file or disk."

I note that if I look at the properties of the folder I only get a General and Customize TAB, whereas other folders have General, Sharing, Security, Web Sharing and Customize TABs.

I also note that the folder has a trailing space. eg "Sample Unit Trust " (Note that there is a space after the word Trust).

I have used the command prompt to find the shortname sample~1 and attempted to delete it, without success.

I am stuck on this one as much as the folder is stuck to my filesystem. Can any expert help me


Regards'

Jim






0
Comment
Question by:jsulliva1957
  • 11
  • 7
18 Comments
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
""I have used the command prompt to find the shortname sample~1 and attempted to delete it, without success.""

Go back to the command prompt and navigate to the file folder this file is in. Type Attrib at that folder's prompt. That will list the attributes on that file. To rid yourself of these attributes you type:

Attrib filename.xxx -a -h -r  
This means you want to remove the attributs of the file that are Archived Hidden or Read only.
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
Just out of curiosity, what file are you deleting? Let's make sure it is not a system file or use protected.
0
 

Author Comment

by:jsulliva1957
Comment Utility
Thanks Chiefit.

I have already tried this and I get a message "unable to change attribute"

It is not a system file either


Cheers


Jim
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
This wouldn't be a profile file, like NTuser.dat, would it?

If so, you can use a little program called UPHclean to unlock those files. (Universal Profile Hive cleanup)
0
 

Author Comment

by:jsulliva1957
Comment Utility
No ChiefIT,

The profiles are all OK.

The folders were created by an application, that has allowed the trailing space (Explorer always strips these in a windows environment)

I will run the UPHClean anyway, and hope you are right.

Jim
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
The folders were created by an application

That explains a lot. You probably have to take ownership of them as administrator before deleting the file or changing the attributes.

Right click on the file>>properties>>security tab>>advanced button>>owner tab>>add the domain admin as an owner
0
 

Author Comment

by:jsulliva1957
Comment Utility
The problem is that the folder only has the general and the customize tab, not the normal (General, Sharing, Security, Web Sharing and Customize TABs)

It is a little bizarre

Jim
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
Yah, a little bizarre is right.

One thing I have done in the past is change the extension of the file to .txt, then siezed ownership and deleted it.
0
 

Author Comment

by:jsulliva1957
Comment Utility
Hi ChiefIT,

This is a folder and hence does not have an extension.

To focus on the peculiarness of the problem, why would other folders have the General, Sharing, Security, Web Sharing and Customize TABs, and the offending folders only have the General and Customise TABs.

Perhaps if this problem can be resolved then the attrinutes/decurity etc can be changed and the folder deleted.

Regards

Jim

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
That's a goooood question:

I have never seen the folder only have two tabs, as you are seeing. It's probably because the application you are using creates the GUI to the file folder in the wrong way.

You know, this question might be best served on a programmers zone specifically for Windows shell objects. I currently see you are on the 2003 server zone only and we should be able to add zones to this by editting the question. To do so, I think you might have to request the assistance of a moderator by creating another zero point question in the general community. Or you can add a 20 point question in one of those zones that point to this link. I avoid programming like the plague, so I am probably not your best bet on answering that question.
0
 

Author Comment

by:jsulliva1957
Comment Utility
Thanks ChiefIT,

I have seen folders with the 2 TABs, on a windows XP system that is not setup for filesharing.

This problem however exists on a Windows Server 2003, that obviously has domain filesharing.

I am the same as you with regards to programming and  I was hoping that the solution to the problem come from the operating system, becuase this is where the problem manifests itself, not in the application.

To clarify if the application became redundant and was uninstalled, this problem still remains inside the windows operating system. As such the solution really needs to come from there.


Regards


Jim

0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
I don't think this will be possible:

When you right click the file, can you select Security and sharing?
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
This is what I am thinking:
The client my not have file/printer sharing enabled. So, when the client creates these files, certain tabs, (like security and sharing tabs), don't appear when creating the file. When passed down to the netshares, it also passes down the lack of ACLs (Access control lists) to the file.

So, maybe the client computer doesn't have:
Client for microsoft networks
and/or
File and printer sharing

anabled on the client machine.

There is a program called ACL.exe that you can minipulate the ACLs of the file folder and files. You might try this.
0
 

Author Comment

by:jsulliva1957
Comment Utility
Thanks ChiefIT,

I have gfone to the application vendor and they are running scripts on the SQL server. Apparently they have heard of this problem and they are fixing it.

I will know tomorrow if they have been sucessful and if so, will seek a technical explanation becuase I cannot see how SQL can have such an effect in windows explorer.

I will post an update when I get it. In the meantime I will have a look at ACL.exe


Jim
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
0
 
LVL 38

Assisted Solution

by:ChiefIT
ChiefIT earned 500 total points
Comment Utility
jsulliva1957:

I was working on a similar post where we came up with a solution. I asked smittyboom to stop by and take credit for this fix. Hopefully taking ownership resolves your issue and smittyboom stops by for credit.
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_23796650.html
0
 

Accepted Solution

by:
jsulliva1957 earned 0 total points
Comment Utility
Hi ChiefIT, I am at a conference and I talked to the Support Analyst who resolved the problem. The problem is not a windows problem, but rather an application problem.

The application fingers the folder every 15 second, and if the folder is deleted, it recreates the file. The solution was to change the folder list in the SQL 2005 database so that the application does not finger the folder.

Jim
0
 
LVL 38

Expert Comment

by:ChiefIT
Comment Utility
Glad it is now up and working for you Jim:

Cheers
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I have never ceased to be amazed how many problems you can encounter on a fresh install of a Windows operating system.  This is certainly case in point& Unable to complete ANY MSI installation.  This means Windows Updates are failing and I can't …
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now