I use this one for Windows PowerShell (adjust the Path)
Get-ChildItem -Path "E:\dreamcast" -Recurse -Filter *.cue | ForEach-Object {$m3uPath = $_.FullName.Replace(".cue", ".m3u"); if (!(Test-Path $m3uPath)) {New-Item -ItemType File -Path $m3uPath -Force | Out-Null}; Add-Content -Path $m3uPath -Value $_.Name}