Search code examples
cygwin

How do I open up multiple files with find from cygwin?


This is a follow-up to https://unix.stackexchange.com/questions/4382/how-to-open-multiple-files-from-find-output.

I've already set aliases for both irfanview and NotePad++ (as notepad) but neither of them work.

Here is one of my sample commands:

find . -name '*.txt' -exec notepad {} +

Solution

  • use a for loop

    for file in $(find . -name "*.txt" -print)
    do
       notepad $file &
    done