Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: search pdf files folders like */myfoder/*.pdf older than 30 days

6 views
Skip to first unread message

Jonathan de Boyne Pollard

unread,
Mar 16, 2010, 10:58:47 AM3/16/10
to

have you got some exemples of MS DOS batch for search pdf files in some folders */myfoder/*.pdf older than 30 days.

Indeed, and with the right command interpreters it's a one-liner.

for /ad /h i in ( * ) del /s /[d-7,%@makedate[0]] %i/myfoder/*.pdf

It's even simpler if you don't actually want that wildcard in the path prefix:

del /s /[d-7,%@makedate[0]] myfoder/*.pdf

No pipes, no temporary files, no worries about local date formats; no muss, no fuss.  And it even works on the flavours of those command interpreters that are available for MS-DOS, as stated in your message, even though you posted in a newsgroup dedicated to Win32 command interpreters and are probably just confusing a command interpreter with an operating system.  (-:

0 new messages