I have csv file like this
ID Name
4 James
6 John
1 Cathy
I want to save those file as .cmd with this format
SET NUMBER1=4
SET NUMBER2=6
SET NUMBER3=1
The total of ID in the csv file is not always 3. If the ID more than 3, it means my cmd file be like this
SET NUMBER1=4
SET NUMBER2=6
SET NUMBER3=1
SET NUMBERN=N
Anyone can help please. I really new in powershell, really need help and advice please. Thanks
$ID = Import-Csv .\Data.csv | Select-Object -ExpandProperty ID
$ID.Count
ForEach ( $id in $ID ) {
}
I am stuck here
foreachloop. ///// however, that is not what i asked ... what are you trying to achieve with this? what is the goal?