我正在我的音乐库中搜索标题与从文件名中提取的歌曲匹配的歌曲。结果搜索非常慢。
ls -Path "C:\Music\New Tracks" | foreach -Process { dir -r -i *.mp3 -Path C:\Music\* | Select-String ([regex]'^.+ - (?<SongTitle>.*)\.mp3$').match($_.Name).Groups[1].Value }
有没有更快的方法来编写脚本?
给出模式的示例文件名是Coldplay Feat Rihanna - Princess Of China.mp3