Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
List 搜索不包含';不包含具有所需名称的文件_List_Powershell_Search_Directory - Fatal编程技术网

List 搜索不包含';不包含具有所需名称的文件

List 搜索不包含';不包含具有所需名称的文件,list,powershell,search,directory,List,Powershell,Search,Directory,我正在整理我的电影文件夹(1500+),并确保它们都有英文和阿拉伯文字幕。我所有的字幕文件都有语言代码(filename.ar.srt)或(filename.en.srt)。我想编写一个powershell或任何其他方便的方法来列出不包含[*.XX.srt]的文件夹,我可以用我正在搜索的语言代码替换这些文件夹。尝试在包含所有电影文件夹的目录中执行此操作: $language = Read-Host "Language to search for" foreach ($folder in (di

我正在整理我的电影文件夹(1500+),并确保它们都有英文和阿拉伯文字幕。我所有的字幕文件都有语言代码(filename.ar.srt)或(filename.en.srt)。我想编写一个powershell或任何其他方便的方法来列出不包含[*.XX.srt]的文件夹,我可以用我正在搜索的语言代码替换这些文件夹。

尝试在包含所有电影文件夹的目录中执行此操作:

$language = Read-Host "Language to search for"

foreach ($folder in (dir -Directory)) {
    if (-not (Get-ChildItem -Path "$($folder.Name)/*.$language.srt")) {
        "Missing $language subtitle for $($folder.Name)"
    }
}

所以不是一个免费的脚本请求站点。到目前为止你试过什么?请出示你的密码。