jeffharbert icon

Randomize lines in CSV file wiht Powershell

jeffharbert | PRO | 07/12/21 12:52:46 PM UTC | 0 ⭐ | 1911 👁️ | Never ⏰ | []
PowerShell |

220 B

|

None

|

0 👍

/

0 👎

# Change the Import-CSV and Export-CSV file paths as needed
$InputList = Import-CSV "C:\path\to\csv file\filename.csv"
$InputList = $InputList | Sort-Object {Get-Random} | Export-CSV "C:\path\to\csv file\filename_randomized.csv"

Comments