Subj : Re: MS XCOPY v 4DOS internal COPY To : Jasen.Betts@xspamp42.f531.n640.z3.f From : Outsider Date : Sat Feb 09 2002 08:32 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. > > 06-Feb-02 10:15:06, Outsider wrote to Jasen.Betts@xspamp42.f531.n640.z3.f ....snipped > >> why not do that like this, it's a little faster. > O> > > >> command /C %temp%\test1.bat | find "\" > test1.bat > > O> Ahh, but you must not allow yourself to be fooled! Because it isn't > O> faster, it is actually slower. It just "appears" as though it > O> _ought_ to be faster because there are fewer lines. Whatever you > O> do, don't fall into the line counting trap > :) I can't see why it would be slower, I guess I'll have to time it then... This comparison should suffice. :: pipe.bat @echo off IF (GOTO:)==(%1) %1%2 (Subroutine handler) echo @prompt $t$_>%temp%.\tmp1.bat command/c %temp%.\tmp1.bat>%temp%.\tmp2.bat for %%? in (0 1 2 3 4 5 6 7 8 9) do call %0 GOTO: 2nd %%? command/c %temp%.\tmp1.bat>>%temp%.\tmp2.bat echo Time for %0... find ":"<%temp%.\tmp2.bat echo ----------- del %temp%.\tmp?.bat goto end :2nd for %%? in (0 1 2 3 4 5 6 7 8 9) do call %0 GOTO: 3rd %3%%? goto end :3rd (Uses a single pipe below!) echo %3 dir c:\|find ":">nul :end :: :: nopipe.bat @echo off IF (GOTO:)==(%1) %1%2 (Subroutine handler) echo @prompt $t$_>%temp%.\tmp1.bat command/c %temp%.\tmp1.bat>%temp%.\tmp2.bat for %%? in (0 1 2 3 4 5 6 7 8 9) do call %0 GOTO: 2nd %%? command/c %temp%.\tmp1.bat>>%temp%.\tmp2.bat echo Time for %0... find ":"<%temp%.\tmp2.bat echo ----------- del %temp%.\tmp?.bat goto end :2nd for %%? in (0 1 2 3 4 5 6 7 8 9) do call %0 GOTO: 3rd %3%%? goto end :3rd (Uses no pipe below!) echo %3 dir c:>%temp%.\tmp3 find ":" <%temp%.\tmp3>nul del %temp%.\tmp3 :end :: If you need a good batch timer program, see below. http://groups.google.com/groups?selm=a1b72u%24p0b4o%241%40ID-25025.news.dfnci s.de http://groups.google.com/groups?selm=5a690240.0111050658.14d14ffc%40posting.g oogle.com ....snipped > O> I have NDOS and it does not have the /e and /a switch. > > a was for all files ... /z is equivalent /e was to defeat error messages > > O> It looks faster, but I have no way of timing it!? Also, I was > O> unable to suppress the screen output > > try this: del /z /y /q /s \*.tmp >&nul That worked just fine. I didn't know about the "&" in front of nul. -- 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) .