Take the 2-minute tour ×
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
add comment

1 Answer

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

Your Answer

 
discard

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.