Link to home
Start Free TrialLog in
Avatar of jsulliva1957
jsulliva1957Flag for Australia

asked on

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

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






Avatar of ChiefIT
ChiefIT
Flag of United States of America image

""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.
Just out of curiosity, what file are you deleting? Let's make sure it is not a system file or use protected.
Avatar of jsulliva1957

ASKER

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
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)
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
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
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
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.
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

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.
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

I don't think this will be possible:

When you right click the file, can you select Security and sharing?
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.
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
SOLUTION
Avatar of ChiefIT
ChiefIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad it is now up and working for you Jim:

Cheers