Skip to main content
Clarified question
Source Link
John Oxley
  • 727
  • 4
  • 12
  • 23

Powershell: Perform an operation on all files in a directory (foreach)

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.

Powershell: Perform an operation on all files in a directory

In bash, the equivalent would be

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

How do I do this in Windows Powershell

Powershell: Perform an operation on all files in a directory (foreach)

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.

Source Link
John Oxley
  • 727
  • 4
  • 12
  • 23

Powershell: Perform an operation on all files in a directory

In bash, the equivalent would be

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

How do I do this in Windows Powershell