![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject [<<]Thread
Number : 4782 Date : 2003-06-10 Author : Garry Deane Subject : Re: Deleting unneeded files Size(KB) : 1
--- In xxcopy@yahoogroups.com, Kan Yabumoto wrote: > > I knew Garry's first step would be DIR /od/b (or its > variation). I was hoping to learn some "pure" > batch technique which extracts the last (or first) > line of the DIR-output and feed to a del command > (which LMOD took care of). It can be done in pure dos batch but the solutions I've seen usually involve creating 'on-the-fly' .com files or debug scripts or tricks with DOSKEY macros. I'm not really that accomplished with these advanced pure DOS techniques but I'm sure it would take a lot more than a few lines to do. Of course if this was limited to Cmd.exe then it's a single line command but I guess that's cheating in this context. @for /f "skip=1 tokens=*" %%a in ( 'dir /a-d/o-d/b "C:\PROGRAM FILES\GRISOFT\AVG6\UPDATE\*.BIN"' ) do (del "C:\PROGRAM FILES\GRISOFT\AVG6\UPDATE\%%a") On the other hand, W9x users could install Microsoft's Win95Cmd http://www.tl.infi.net/~wtnewton/batch/fixcmd.htm as a replacement for COMMAND.COM and get this functionality. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.