Solved

Remove read-only attribute of a folder

Posted on 2002-06-14
12
768 Views
Last Modified: 2010-04-13
How do I remove the read-only attribute of a folder. I'm not having any luck with it. I right click the folder, click Properties, uncheck read-only, click Apply, and then click OK. It appears to work but when I check the properties again the folder is still read-only.
0
Comment
Question by:dmoranz
12 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7079962
Is this on all folders or just a particular one or two? Do you have administrative rights?


The Crazy One
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7079976
Have you checked for virus's? Free online scanner www.housecall.antivirus.com
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7079984
From the Windows Help

"To change properties for archiving, indexing, compression, or encryption on NTFS drives, right-click the file or folder, click Properties, click Advanced, and then select the options you want to change. "
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7079989
Also this is from the Windows help file

"To set, view, change, or remove file and folder permissions

Open Windows Explorer, and then locate the file or folder for which you want to set permissions.
Right-click the file or folder, click Properties, and then click the Security tab.
Do one of the following:
To set up permissions for a new group or user, click Add. Type the name of the group or user you want to set permissions for using the format domainname\name, and then click OK to close the dialog box.
To change or remove permissions from an existing group or user, click the name of the group or user.
In Permissions, click Allow or Deny for each permission you want to allow or deny, if necessary. Or, to remove the group or user from the permissions list, click Remove.
 Notes

To open Windows Explorer, click Start, point to Programs, point to Accessories, and then click Windows Explorer.
You can set file and folder permissions only on drives formatted to use NTFS.
To change permissions, you must be the owner or have been granted permission to do so by the owner.
Groups or users granted Full Control for a folder can delete files and subfolders within that folder regardless of the permissions protecting the files and subfolders.
If the check boxes under Permissions are shaded, or if the Remove button is unavailable, then the file or folder has inherited permissions from the parent folder."
0
 
LVL 7

Expert Comment

by:franka
ID: 7080261
JSI FAQ:
http://www.jsifaq.com/SUBG/TIP3200/rh3212.htm

If you can't remove the read-only attribute from a folder, I bet that you have a Desktop.ini file in the folder whose read-only attribute is set.

To resolve the problem, remove the read-only attribute from the Desktop.ini file, using either of the following:

- Right-click the Desktop.ini file and press Properties. Uncheck the Read-only attribute and press Apply.

- Open a CMD prompt and type: attrib -r <Drive:>\Folder\Desktop.ini
0
 
LVL 44

Accepted Solution

by:
CrazyOne earned 500 total points
ID: 7080460
Hmmm I just came across this MS KB

QUOTE

http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q256614

Unable to Remove Read-Only Flag from Folder (Q256614)

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Windows 2000 , Advanced Server
Microsoft Windows 2000 , Professional
Microsoft Windows 2000 , Server
Microsoft Windows NT Workstation version 4.0
Microsoft Windows NT Server version 4.0
Microsoft Windows 98
Microsoft Windows 95
--------------------------------------------------------------------------------
IMPORTANT : This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
Q256986 Description of the Microsoft Windows Registry


SYMPTOMS
You may be unable to remove the Read-Only attribute from a folder using Windows Explorer. In addition, some programs may display error messages when you try to save files to the folder.


CAUSE
This behavior occurs because the folder is customized. You can customize a folder by clicking Customize this folder on the View menu. Many programs also customize folders (for example, the Fonts folder comes with a customization as part of the standard system configuration).

STATUS
This behavior is by design.

MORE INFORMATION
WARNING : If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Windows Explorer uses the Read-Only attribute to determine whether or not the folder is customized. To work around this behavior, you can configure Windows Explorer to use the System flag instead of the Read-Only flag. To do this, use the following steps.

NOTE : Some programs do not operate correctly with folders that have the System attribute configured.

Start Registry Editor (Regedt32.exe).

Locate the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Explorer
On the Edit menu, click Add Value , and then add the following registry value:

Value Name: UseSystemForSystemFolders
Data Type: REG_DWORD
Value: 1
Quit Registry Editor.

You can find additional information about folder customization in the Platform Software Development Kit (SDK). Refer to the PathMakeSystemFolder function and the "Customizing Folders with Desktop.ini" shell basics chapter at the following Microsoft Web sites:
http://msdn.microsoft.com/library/psdk/shellcc/shell/shlwapi/path/pathmakesystemfolder.htm

http://msdn.microsoft.com/library/psdk/shellcc/shell/shell_basics/custom.htm

UNQUOTE
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 7

Expert Comment

by:franka
ID: 7080516
crazyone: that exactly the desktop.ini problem I mentioned.
And I guess this KB-workaround will help only to prevent future read-only problems.
0
 
LVL 16

Expert Comment

by:GUEEN
ID: 7080674
Are you able to use the DOS attrib command?
Let's say your folder is located at C:\winnt\test  (and the test folder is read-only)
Open up a DOS prompt (go to start | run and type cmd
cd = change directory
dir = list
.. = go back 1 directory
c:\ = go to root
If you were to work with the test directory and you were in c:\documents and settings\all users
you would type:
c:\
then you would type:
cd winnt
this would place you in the winnt directory
now to remove the read-only attribut from the test directory you would type:
attrib -r test

0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7080689
Franka not exactly. The one you mentioned refers to changing the Desktop.ini file readonly flag contolling the readonly flag on the folder. I have several Destop.ini files and none of them are flagged read only but the folder they reside in is flagged readonly. Changing the readonly flag on the Destop.ini file one way or the other had no affect on the folders readonly flag. The MS KB explians about why the readonly flag is set on the folder and how to make a folder customized. Although the article doesn't mention it  you can uncustomize a folder from the View >  Customize this folder and from the wizard one can choose "Revome customization".  

Also this article explains a little bit about how the Desktop.ini is used to customize a folder and how to use the s switch wtih the attrib command to make a folder customized.

attrib +s Folder  customizes the folder
attrib -s Folder  uncustomizes the folder

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/programmersguide/shell_basics/shell_basics_extending/custom.asp

"File system folders are commonly displayed with a standard icon and set of properties, which specify, for instance, whether or not the folder is shared. You can customize the appearance and behavior of an individual folder in two ways:

Create a Desktop.ini file for the folder
Create a Folder.htt template for the folder
Folders can be displayed in either Classic or Web style. For a detailed discussion of these styles, see Web View. The Desktop.ini file, discussed here, applies to both styles. It allows you to assign a custom icon to a folder and control its behavior in a limited way.

To customize the folder's style beyond what is possible with the Desktop.ini file, you must create a custom Folder.htt template for the folder. This file will only affect the appearance of the folder when the Web style is selected. If this template is not present in the folder, the Shell uses a default template. For further discussion of .htt templates, see The Web View Template.

Folders are normally displayed with the standard folder icon. The most common use of the Desktop.ini file is to assign a custom icon to a folder. This icon will be displayed in Classic style as well as Web style, and it will appear next to the folder's name anywhere the name appears. You can also use Desktop.ini to create an infotip that displays information about the folder and controls some aspects of the folder's behavior, such as whether it can be shared.

Use the following procedure to customize a folder's style with Desktop.ini:

Use PathMakeSystemFolder to make the folder a system folder. You can also make a folder a system folder from the command line by using attrib +s FolderName.
Create a Desktop.ini file for the folder. You should mark it as hidden and read-only to protect it from being modified.
Creating a Desktop.ini File
The Desktop.ini file is a text file that allows you to specify how a file system folder will be viewed. There are three sections in the file. The first two, [ExtShellFolderViews] and [{5984FFE0-28D4-11CF-AE66-08002B2E1262}] are necessary only if you want to use a custom Folder.htt template. If you omit them, the system will use the default template. To use a custom Folder.htt template, you must include these two sections into the Desktop.ini file exactly as they are shown:

[ExtShellFolderViews]
Default={5984FFE0-28D4-11CF-AE66-08002B2E1262}
{5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262}

[{5984FFE0-28D4-11CF-AE66-08002B2E1262}]
PersistMoniker=file://Folder.htt
The third section, [.ShellClassInfo], allows you to customize the folder's view by assigning values to several entries:

Entry Value
ConfirmFileOp Set this entry to 0 to avoid a "You Are Deleting a System Folder" warning when deleting or moving the folder.
NoSharing Set this entry to 1 to prevent the folder from being shared.
IconFile If you want to specify a custom icon for the folder, set this entry to the icon's file name. The .ico file extension is preferred, but it is also possible to specify .bmp files, or .exe and .dll files that contain icons. If you use a relative path, the icon will be available to people who view the folder over the network. You must also set the IconIndex entry.
IconIndex Set this entry to specify the index for a custom icon. If the file assigned to IconFile only contains a single icon, set IconIndex to 0.
InfoTip Set this entry to an informational text string. It will be displayed as an infotip when the cursor hovers over the folder. If the user clicks the folder in a Web view, the information text will be displayed in the folder's information block, below the standard information. "
0
 

Author Comment

by:dmoranz
ID: 7084284
CrazyOne -  Thanks! This is exactly my problem! I customized the folder and subfolders for image previews. Removing the customization didn't solve the problem. I didn't want to make the registry changes like MS KB suggests so I created new folders and moved everything out of the read-only folders.
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7084313
:>)
0
 
LVL 7

Expert Comment

by:franka
ID: 7084407
this is why I love EE ...:-(
0

Featured Post

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!

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

14 Experts available now in Live!

Get 1:1 Help Now