🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #15388

Writing to Directories

#15388
From: dalegass
Date: Mon, 26 Jan 1987 12:11
24 lines
1685 bytes
I am working on a utility where I need to be able to write to a directory
entry.  I am able to *read* from a directory file using FINDFIRST and
FINDNEXT ms-dos calls, but I can't find any way to write back to the
directory.  MS-DOS won't allow treating the directory like a file, so
it can not be opened for normal file operations.  (The CHMOD function
call won't allow changing the directory bit, which would have allowed
turning the directory entry into a file entry temporarily.)

I realize this can be done through writing directly to the disk sector
containing the directory entry, but the root directory lies at different spots
on floppies, and different hard disks, so this poses a compatability problem.

If anyone has any suggestions, I would be very thankful.


***************************************************************************
Dale Gass, Dalhousie U., Halifax, N.S., Canada

UUCP:   {seismo|watmath|utai|garfield}!dalcs!dalegass.UUCP
     				       or dalegass@dalcs.UUCP
        ...!dalcs!dalcsug!dalegass.UUCP  or dalegass@dalcsug.UUCP
CDN:    dalegass@cs.dal.cdn
CSNET:  dalegass%cs.dal.cdn@ubc.csnet
ARPA:   dalegass%cs.dal.cdn%ubc.csnet@CSNET-RELAY.ARPA
Technical Details
Message-ID: <2377@dalcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!dalcs!dalegass

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!dalcs!dalegass
From: dalegass@dalcs.UUCP
Newsgroups: comp.sys.ibm.pc
Subject: Writing to Directories
Message-ID: <2377@dalcs.UUCP>
Date: Mon, 26-Jan-87 07:11:03 EST
Article-I.D.: dalcs.2377
Posted: Mon Jan 26 07:11:03 1987
Date-Received: Tue, 27-Jan-87 01:51:45 EST
Organization: Dept. of Math., Stats & C.S., Dalhousie University, Halifax, N.S., Canada
Lines: 24
Keywords: MS-DOS,directory