$files = Get-Content -Path D:\PS-Tutorial\file-with-numbers.txt
ForEach ($file in $files) {
New-Item -Name $file -Path "D:\PS-Tutorial\ForEachEx" -ItemType "directory" | Out-Null }
}
$files = Get-Content -Path D:\PS-Tutorial\file-with-numbers.txt
$files | ForEach-Object {
New-Item -Name $_ -Path "D:\PS-Tutorial\ForEach-ObjectEx" -ItemType "directory" | Out-Null
}
$files = Get-Content -Path D:\PS-Tutorial\file-with-numbers.txt
$files.ForEach( {
New-Item -Name $_ -Path "D:\PS-Tutorial\ForEachMethodEx" -ItemType "directory" | Out-Null
} )
Không có nhận xét nào:
Đăng nhận xét