Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change Attributes of Directory.

Posted on 1999-06-30
3
Medium Priority
?
1,762 Views
Last Modified: 2013-12-29
Using dos under win95.
How can I use dos to remove the attributes of a directory (by attributes I mean Hidden/System/ReadOnly etc). I have tried every combination of the Attrib command but this seems to be strictly limited to files not directories.

Any help very welcome.
0
Comment
Question by:brockway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
jmenees earned 400 total points
ID: 1689581
dont inclued brackets

 ATTRIB  [directoryname] To display the attributes of a directory:

 ATTRIB      [filename]  To display the attributes of a file:

To set or remove attributes of a file or directory:

ATTRIB [ +  - A] [ +   - H] [ +   - R] [ +   - S] [directory filename] [/S]

+ Sets an attribute. - Clears an attribute.
 A       Archive file attribute.
 H       Hidden file attribute.
 R       Read-only file attribute.
 S       System file attribute
 /S       Processes files in all directories in the specified path.

To hide the directory call test  c:\test
ATTRIB +H c:\test

To remove the hide
ATTRIB -H c:\test

To hide the files (but not the directories) in the C:\test
ATTRIB +H c:\test\*.*

you can add mult combos like
ATTRIB +H+S+R C:\Test

remove
ATTRIB -H-S-R C:\test

The directory's Read-Only attribute can be set. But this seems to serve NO purpose at all. The attribute only applies to the directory only and NOT the files within the directory.

0
 

Author Comment

by:brockway
ID: 1689582
Well yes that should work but try adding all the attributes to a directory (including hidden). Then coding

ATTRIB -h -s -R -A C:\Testdir\*.* /s

The files will have their attributes removed but the directory and any hidden subdirectory will continue to have the hidden attribute.

What am I  missing here?
0
 

Author Comment

by:brockway
ID: 1689583
Increase in points for the genious that cracks this one!!
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

660 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