Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 6 down vote accepted
ls *.zip | foreach-object { unzip $_ }
share|improve this answer
Unfortunate example: unzip *.zip easily works. – Joey Aug 12 '09 at 13:10
Canonical powershell uses gci or Get-ChildItem. – Jay Bazuzi Mar 11 '11 at 3:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.