fisher@sc2a.unige.ch (Markus Fischer) (05/29/89)
In article <7448@bsu-cs.bsu.edu>, timphus@stltar.stl.informatik.uni-dortmund.de (Stefan Timphus) writes: > This program was originally posted in this newsgroup as: > > |Subject: v01i229: move, a file moving utility, C source > | > |MOVE allows DOS users the ability to MOVE files from one directory to > |another with a minimum of effort. [...] > This is a revised version -- see near the end of the source file. -- > R.D.] > > Stefan Timphus > timphus@stltar.stl.informatik.uni-dortmund.de > simula@trillian.irb.informatik.uni-dortmund.de I see that the file search of the new move.c hasn't been changed (line 82 of the extracted file) : 82> done = findfirst(argv[1],&dta,47); /* Go look for first file */ The attribute of the permitted files is (decimal) 47 == (bin) 101111 == (in TC) FA_ARCH & FA_LABEL & FA_SYSTEM & FA_HIDDEN & FA_RDONLY (!). It is questionable whether `move' should act on hidden or read_only files, but I consider it a bug that it acts on system files (usually only the two **-DOS startup files) or on the disk-label... Those who wish might prefer to change the _attrib_ constant to FA_ARCH & FA_RDONLY (0x21 == (dec) 33) or even FA_ARCH (0x20 == (dec) 32). (The FA_* compile constants are defined in <dos.h>). After modification, the line should thus read : 82> done = findfirst(argv[1],&dta,33); /* Go look for first file */ ^^ Markus Fischer -|--|--|--|--|--|--I Department of Anthropology -|--|--|--|--|--|--|-(#)-I University of Geneva -|--|--|--|--|--|--|--|--|-(#)-|-(#)(#)(_)-I CH-1227 Carouge (GE) -&-(_)-|--|--|-(#)-&--|-(#)(#)(_)(#)-&-(_)(#)-I Switzerland -|--|--|--|--|-(#)(_)-|-(_)(_)(_)(#)-I black (#) to kill ! --|--|-(#)(_)(_)(_)(#)(#)(_)(_) fisher@sc2a.unige.ch =+==+==+==+==+==+==+==+==+==+==+==+==+==+==+=(#)=+ fisher@cgeuge52.bitnet