Tuesday, June 29, 2010

PowerShell - For Each Line in File

get-content D:\Scripts\file.txt | ForEach-Object {do stuff $_}

$_ is the variable for the current line in the file.

No comments:

Post a Comment