3

In bash, the equivalent would be

for x in `ls *.zip` do ; unzip $x ; done

How do I do this in Windows Powershell.

Update As Johannes Rössel pointed out this is a bad example (unzip *.zip) but what I'm after is the "foreachness" of it.

1 Answer 1

6
ls *.zip | foreach-object { unzip $_ }
2
  • 2
    Unfortunate example: unzip *.zip easily works.
    – Joey
    Commented Aug 12, 2009 at 13:10
  • 3
    Canonical powershell uses gci or Get-ChildItem.
    – Jay Bazuzi
    Commented Mar 11, 2011 at 3:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .