Subj : Re: MS XCOPY v 4DOS internal COPY To : Jasen.Betts@xspamp42.f531.n640.z3.f From : Outsider Date : Wed Feb 06 2002 10:15 am From: Outsider@f3.n342.z1.cereal.mv.com (Outsider) Subject: Re: MS XCOPY v 4DOS internal COPY From: Outsider Jasen.Betts@xspamp42.f531.n640.z3.fidonet.org wrote: > > Hi Outsider. > > 04-Feb-02 07:51:18, Outsider wrote to Jasen.Betts@xspamp42.f531.n640.z3.f > > O> I found this batch to be slightly faster than the corresponding "DIR" > O> version (not shown). Runtimes below > > O> deltmps.bat (attrib.exe version) > O> 0.237632 > > O> deltmps2.bat (dir version) > O> 0.645574 > > about 2-1/2 times faster, that's pretty impressive. > what version of 4dos (and what comspec setting) did you use? > I can't get it to function here unless I use command.com instead of 4dos. No, it is a command.com batch. I was merely showing that ATTRIB.exe is a little faster than the internal DIR command as an addition to the conversation about the speed of xcopy vs. copy. > O> PROMPT DEL %=% > > this is the first part where 4dos won't work.... 4dos doesn't %prompt% with > echo on... > > O> CTTY nul > O> %COMSPEC%/C%temp%.\test1.bat> %temp%.\test2.bat > O> CTTY con > O> ECHO [2A > O> FIND.EXE "\" <%temp%.\test2.bat> %temp%.\test1.bat > > why not do that like this, it's a little faster. > > ctty nul > command /C %temp%\test1.bat | find "\" > test1.bat > ctty con Ahh, but you must not allow yourself to be fooled! Because it isn't faster, it is actually slower. It just "appears" as though it _ought_ to be faster because there are fewer lines. Whatever you do, don't fall into the line counting trap . > O> runtime comparison of ATTRIB.exe and DIR. attrib /s > O> 0.011013 > O> 0.010925 > > O> dir/a-d/b/s > O> 0.039377 > O> 0.039403 > > are you discussing 4dos? because when I compared things I found that > command's dir was slowest of them all, but 4dos dir was fastest. This doesn't really surprise me. > if you've got 4dos time this one too. > > del /seya: \*.tmp > > It should be about 10 times faster than that bat, and does the same thing. I have NDOS and it does not have the /e and /a switch. DEL [/N][/P][/Q][/S][/X][/Y][/Z] [drive:][path]filename... ERASE [/N][/P][/Q][/S][/X][/Y][/Z] [drive:][path]filename... /N Do Nothing: Just test results of the deletion. /P Prompt: Confirm (Y/N) deletion for each file. /Q Quiet: Don't display filenames as they are deleted. /S Subdirectory: Delete from current dir and its subdirs. /Y Yes: Delete files and directories without prompting. /X Remove empty subdirectories. /Z Zap: Delete hidden, system, and read-only files as well. It looks faster, but I have no way of timing it!? Also, I was unable to suppress the screen output. I can't use NDOS or newer because it is completely incompatible with everything I do, how I work, and all my batch programs, so comparisons and further testing from my side is really academic. Besides that, I write a lot of batches for other people, and they don't use 4DOS. Since my knowledge doesn't seem to be of much use here, so I'll keep quiet now. -- MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Communicator 4.08 -- |Fidonet: Outsider 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .