|
|
|
|
@ -12,7 +12,6 @@
|
|
|
|
|
|
|
|
|
|
#$Include = ".rmvb", ".mp4", ".mkv", ".avi" |
|
|
|
|
$SubExt = if ($Sub) { ".ssa", ".ass", ".srt" } |
|
|
|
|
$Include = $Include + $SubExt |
|
|
|
|
|
|
|
|
|
Import-Module -Name ($PSScriptRoot + "\PathChar.psd1") |
|
|
|
|
Import-Module -Name ($PSScriptRoot + "\NameRegex.psd1") |
|
|
|
|
@ -22,7 +21,7 @@ $TargetName = ""
|
|
|
|
|
#$DestinName = "真の仲間" |
|
|
|
|
Write-Output $Path |
|
|
|
|
#$Index = "L:\AnimeLib" |
|
|
|
|
d |
|
|
|
|
|
|
|
|
|
# scriptblock 減少重複 |
|
|
|
|
$RegexpSet = { |
|
|
|
|
# 全域化 |
|
|
|
|
@ -166,14 +165,14 @@ if ($Single) {
|
|
|
|
|
$List = @(Get-Item -Path $(Edit-PathChar $Path)) |
|
|
|
|
$BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.NewName.Episode -notin $WorkData.Episode} |
|
|
|
|
#$BuildList | ? {$_.NewName.Episode -notin $WorkData.Episode} | Format-List |
|
|
|
|
# } elseif ($Sub) { |
|
|
|
|
# $List = @(Get-Item -Path $(Edit-PathChar $Path)) |
|
|
|
|
# $BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.File.Extension -in @(".ass", ".ssa")} |
|
|
|
|
<# } elseif ($Sub) { |
|
|
|
|
$List = @(Get-Item -Path $(Edit-PathChar $Path)) |
|
|
|
|
$BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.File.Extension -in @(".ass", ".ssa")} #> |
|
|
|
|
} elseif ($testrun) { |
|
|
|
|
$List = @(Edit-PathChar $Path | Get-Item | ? { $_.GetType().Name -eq "FileInfo" }) + |
|
|
|
|
@(Edit-PathChar $Path | Get-Item | ? { $_.GetType().Name -eq "DirectoryInfo" } | % { $_.GetFiles() }) |
|
|
|
|
$BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj |
|
|
|
|
if ($Include -ne "") { $BuildList = $BuildList | ? {$_.File.Extension -in $Include} } |
|
|
|
|
if ($Include -ne "") { $BuildList = $BuildList | ? {$_.File.Extension -in $Include, $SubExt} } |
|
|
|
|
if (-not($Force)) { $BuildList = $BuildList | ? {$_.NewName.Episode -notin $WorkData.Episode} } |
|
|
|
|
} else { |
|
|
|
|
exit 0; |
|
|
|
|
|