Recursive read-only attribute change in NT4.0 - How?

Masa

Member
Jan 24, 2000
43
0
0

Hi,

just a little question... is it possible to recursively change the read-only attribute of directories (so that all files also in the subdirectories effected) in Windows NT 4.0?

(Just restored a whole lot of backed up files and they wound up being read-only... It's a real annoynace to have to go through all sub-directories individually, select all and then remove the read-only mark in the properties - and that's the only way I know... :( )

- Masa
 

jaywallen

Golden Member
Sep 24, 2000
1,227
0
0
Hi, Masa.

Open a command prompt, and type in this command:

attrib -r x:\path\filespec /s /d

then hit the Enter key. (The "attrib -r" parti is literal, "x" is the drive, "\path\filespec" allows you to specify the top level directory for the command to work on, "/s" is literal and makes the command process files in subdirectories, and "/d" is literal and makes the command also process the folders themselves.)

Or type in this command:

attrib /?

for more information on how to use the command.

Hope this helps. BTW, W2K will let you just do this from the properties dialog for a folder. You get to chose whether to just process the contents of the current directory or the subfolders and their files.

Regards,
Jim

EDIT: Damn! I'm sorry. I forgot that the "/d" switch doesn't work in NT4. That means that the read only attribute can't be changed ON THE FOLDERS THEMSELVES. The "/s" switch will cause the command to work on the FILES within subdirectories, however. But you'll have to manually select and change attributes on the folders themselves.
 

Masa

Member
Jan 24, 2000
43
0
0
Thanks!

The use of the "good old" attrib never even crossed my mind, thanks! (Should of thought about that - it just shows what harm getting used to a graphical interface does! Well, luckily there's still linux... :D )

Actully I'm thinking about upgrading to Win2k pretty soon, but am still a bit wary - are there really that many benefits, when one in any case uses 98 for gaming etc.? Well, I guess that's a totally different story. But thanks again for the help!

Masa

 

jaywallen

Golden Member
Sep 24, 2000
1,227
0
0
Hi,

Well, W2K is very nice. It will boot and do some things slower than NT4 on the same machine, but it is very well thought out and pleasant to use. You really want to do your homework (with regards to hardware and software compatibility) before taking the leap. Getting device drivers sorted out is the single most difficult issue I've faced with updating most systems to W2K. As far as software goes, well, you might be able to use W2K for your gaming. Depends on what you play. I have found a couple of games that just won't run under W2K. (Lightbringer was given to me as a gift. Looked intriguing, but all the king's horses and all the king's men can't make it run under W2K -- so far.) I play Riven, Myst, Zork Grand Inquisitor, Zork Nemesis. (I've already solved them long since, but it's fun to go back through, anyway. Hey, what can I say. I'm old. I forget enough between rounds that it's all new to me the next time!)

:D

Regards,
Jim
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Try this.

When installed, this registry entry, will add an option to the context menu on directories. Select 'Unlock' to recursively remove the read-only attribute.

Unfortuately, Tripod rather mangles the file. You will need to save it as a text file (with a .reg extension).