Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!dalcs!dalcsug!dalegass From: dalegass@dalcsug.UUCP Newsgroups: comp.sys.ibm.pc Subject: Reading/Writing Directories using FCBS Message-ID: <117@dalcsug.UUCP> Date: Fri, 7-Aug-87 16:15:18 EDT Article-I.D.: dalcsug.117 Posted: Fri Aug 7 16:15:18 1987 Date-Received: Sun, 9-Aug-87 01:02:07 EDT Organization: Dalhousie University, Halifax, N.S., Canada Lines: 31 I have a specialized need where I have to be able to write to a subdirectory. No flames, please, about it being bad style to do this, but in my case it is required. I have heard that the only way to actually write to a subdirectory is to modify it using FCB's, as opposed to the advanced file I/O methods... However, I seem to be unable to do this. Could anyone give me some advice on what I might be doing wrong. Here's the basic idea of how I'm trying to open this directory: MOV AH,0FH ; CODE FOR FCB OPEN MOV DS,[SEG] ; GET SEGMENT FOR FCB MOV DX,FCBOFS ; OFFSET FOR EXTENDED FCB INT 21H ; DO IT Where SEG:FCBOFS is set to DB 0FFH ; EXTENDED FLAG DB 5 DUP (0) ; RESERVED DB 010H ; ATTRIBUTE = DIRECTORY DB 0 ; DRIVE (USING DEFAULT) DB 'DIRNAME ' ; DIRECTORY NAME. And this doesn't work... I believe the extended error code is along the lines of access denied. Another route I've attempted is to CHMOD the direcotry into a file, but this fails as well. Please, any suggestions are greatly needed.... dalegass@dalcsug.uucp