Can't delete R-O directories?

1 view
Skip to first unread message

i...@starnetinc.com

unread,
May 31, 1996, 3:00:00 AM5/31/96
to

I have discovered an inconsistency in dealing with read-only directories
that virtually prevents the deletion of those directories. I would like
suggestions on working around this problem, if possible.

To reproduce:

- create a new directory ('FOLDER')
- mark FOLDER read only via its Settings notebook
- a DIR /AR from its parent directory will correctly show FOLDER
- an ATTRIB F* will not show the directory (ATTRIB * doesn't show any
directories, actually, which makes me think it intentionally ignores them)
- ATTRIB -R FOLDER does nothing
- Manually removing the read only marking via Settings is the only way to
delete the directory

So why is this hard? When copying CD-ROMs to a hard disk, all files
and directories are marked R-O. A simple 'ATTRIB -R * /S' wil unmark all
files, but you cannot delete the directories. It seems the only way to do this
reasonably quickly is by using File Manager, which prompts for each R-O
directory, but allows them to be deleted anyway.

Shouldn't there be a way to do this with OS/2?

Thanks,

Steve

Uwe Schroeder

unread,
Jun 3, 1996, 3:00:00 AM6/3/96
to

On 31 May 96 i...@starnetinc.com
wrote about "Can't delete R-O directories?":

i> - Manually removing the read only marking via Settings is the only way to
i> delete the directory
i> Shouldn't there be a way to do this with OS/2?

RW.CMD
------
/* Remove R/O attributes from directory tree */

arg dir
call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
call SysFileTree dir, 'file', 'D', '***+*', '***-*'
call SysFileTree dir'\*', 'file', 'S', '***+*', '***-*'


usch

--
: us...@viking.ruhr.com : 75472...@compuserve.com :
: http://www.ruhr.de/home/squonk :
: "Every feature is a bug unless it can be turned off" :

[Doug Darrow]

unread,
Jun 3, 1996, 3:00:00 AM6/3/96
to

In <4onj6t$t...@news0-alterdial.uu.net>, i...@starnetinc.com writes:
--[snip]--

>and directories are marked R-O. A simple 'ATTRIB -R * /S' wil unmark all
>files, but you cannot delete the directories. It seems the only way to do this
>reasonably quickly is by using File Manager, which prompts for each R-O
>directory, but allows them to be deleted anyway.
>
>Steve
>
This does appear to be an inconsistency in OS/2 but I don't think it
falls under the heading of a true bug. The inconsistency stems from
OS/2's backwards compatibility with DOS. Under DOS ATTRIB could not
manipulate directory attributes in any way which strikes me as odd
since a directory in really only a special file. When OS/2's ATTRIB
was written they wrote it as a Family mode utility which runs under
either OS/2 or DOS, so, for compatibility, they gave it no more
functionality than what it had in DOS 5.0.

There are DOS third-party ATTRIB replacements which CAN manipulate
directory attributes. You could use one of these to batch set the
directories. Also, most shell replacements like 4OS2 or YAOS2 include
attribute setting capabilities for directories.

---------------------------------------------------------------------
Doug Darrow <dsda...@terminus.com> The Second Foundation - Lompoc,CA
---------------------------------------------------------------------


Antony

unread,
Jun 6, 1996, 3:00:00 AM6/6/96
to
> I have discovered an inconsistency in dealing with read-only directories
>that virtually prevents the deletion of those directories. I would like
>suggestions on working around this problem, if possible.
>
> To reproduce:
>
> - create a new directory ('FOLDER')
> - mark FOLDER read only via its Settings notebook
> - a DIR /AR from its parent directory will correctly show FOLDER
> - an ATTRIB F* will not show the directory (ATTRIB * doesn't show any
>directories, actually, which makes me think it intentionally ignores them)
> - ATTRIB -R FOLDER does nothing
> - Manually removing the read only marking via Settings is the only way to
>delete the directory
>
> So why is this hard? When copying CD-ROMs to a hard disk, all files
>and directories are marked R-O. A simple 'ATTRIB -R * /S' wil unmark all
>files, but you cannot delete the directories. It seems the only way to do this
>reasonably quickly is by using File Manager, which prompts for each R-O
>directory, but allows them to be deleted anyway.
>
> Shouldn't there be a way to do this with OS/2?

If you want to delete a directory which was copied from a CDROM, try this...

Create a new folder, drag the R-O folder into it. Drag the whole lot into the
shredder - it'll ask you are you sure? say yes to all...
It'll also report that object such'n'such is R-O and want's to confirm deletion
select yes to all again...
Zap - directory and contents gone.

Regards
Antony.

http://nuts.ml.org/ My Warped Server uses IBM ICS for OS/2!!!
ftp://nuts.ml.org:6666 My Warped Mind uses OS/2 for all multitasking :)
OS/2 Files and "stuff" Your choice: 32bit OS/2 or 16bit Win95.........

Arto M{{tt{

unread,
Jun 6, 1996, 3:00:00 AM6/6/96
to

What shell are you using? I tried the attrib command like you
described and it worked just right. Then I started 4os2 and it didn't
do it right. So if you are not using cmd.exe try using it.

Arto

--
Team OS/2

Reply all
Reply to author
Forward
0 new messages