Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: looking for a quickie

by BrowserUk (Pope)
on Mar 18, 2003 at 19:08 UTC ( #244127=note: print w/replies, xml ) Need Help??

in reply to How do I execute a shell command against each file in a directory and it's subdirectories? (was: looking for a quickie)

No perl, cygwin or 4NT required:)

for /F %f in ('dir /s /b') do doit -switches %f

Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.

Replies are listed 'Best First'.
Re: Re: looking for a quickie
by jsprat (Curate) on Mar 18, 2003 at 19:35 UTC
    ++BUK for getting me to look at the cmd.exe docs!

    Here's another snippet -

    for /R %f in (*) do doit -switches %f

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://244127]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-01-17 01:49 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (194 votes). Check out past polls.