LANCommander/LANCommander.Server/Snippets/Examples/Sanitize Filename.ps1
2024-08-04 18:44:33 -05:00

2 lines
No EOL
150 B
PowerShell

# Takes the variable $Filename, splits it by invalid characters, then joins using _
$Filename.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'