Path: utzoo!utgpu!water!watmath!clyde!ima!johnl From: johnl@ima.ISC.COM (John R. Levine) Newsgroups: comp.sys.ibm.pc Subject: Re: How to change directory entries in DOS ? Keywords: DOS directory entry Message-ID: <861@ima.ISC.COM> Date: 24 Jan 88 23:10:23 GMT References: <1395@homxb.UUCP> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Not enough to make any difference Lines: 24 In article <1395@homxb.UUCP> mr@homxb.UUCP (mark) writes: >I would like to change entries in the directory structure. >For example : > >1) Change last modification date >2) Change mode (This has a sys call) > >... There are system calls to change almost every part of a directory entry. System call 57h changes the modification date, and 43h changes the mode. You can change the name with 56h, including moving a file from one directory to another. You can, as suggested, read and write the disk yourself which involves using interrupts (not calls) 25h and 26h, but if you can possibly do it with the calls, you'll be much better off. Someday, you'll want to run your program over a network, on a DOS-unix-Unix system, or in some other strange environment. If you use the calls, it'll probably work. If you munge the disk yourself, it certainly won't. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something Gary Hart for President -- Let's win one for the zipper.