Re: Which delete statement is faster?



briggs@xxxxxxxxxxxxxxxxx wrote:
In article <13h9vel51sekc1b@xxxxxxxxxxxxxxxxxx>, "Mike Minor" <mminorhsd@xxxxxxxxxxxxx> writes:
Is there any difference in the speed at which the command is executed in the following examples?

del a*.*;*
del a*.txt;*
del a*.txt;1

I think that a non-wildcarded delete will be the fastest since it can do a direct lookup. (but this is not in your example)

In the above cases, the delete command would still have to sequentially scan all files in the directory beginning with "a" and then see if it matches the mask. Obviously, the more "*" you have in a mask, the more CPU will be needed to decide if a full file spec matches the wildcard, but unless you are running an All Mighty Microvax II, you might not see any difference since the delete command will spend the most time in IO and the CPU time needed to check a string against a wildcard specification is fairly trivial.
.



Relevant Pages

  • Re: Using Run" feature
    ... imbolc42 hunted and pecked: ... "nass" wrote: ... Do you mean the Del command?. ...
    (microsoft.public.windowsxp.newusers)
  • Re: DEL command help
    ... I couldn't get the command working. ... See the command prompt output ... Also, I actualy simplified the scenario in my original post, I actually want ... I can easily produce the date part of the command via the SQL tool (i.e "del ...
    (microsoft.public.win2000.cmdprompt.admin)
  • RE: Using Run" feature
    ... "imbolc42" wrote: ... "nass" wrote: ... Do you mean the Del command?. ...
    (microsoft.public.windowsxp.newusers)
  • Re: deltree or remove folder in batch command
    ... As I remember the command DEL deletes files and does not remove folders. ... The command RMDIR removes folders. ...
    (microsoft.public.windows.mediacenter)
  • Re: Need Help: C++ Delete Known File
    ... >(unlink, erase or del)." ... even the command line's "del" is built in to the command ... command processor, since removing is a system API facility that can be ... invoke the command processor, with the exception of those designed ...
    (comp.lang.cpp)