PS Ordner durchsuchen
Ordner durchsuchen, Datei Filtern, bestimmtes Format
Hallo,
da ich leider noch ein Anfänger bin wende ich mich an euch.
Ich habe in C:\Filme
ganz viele Ordner mit Filmen
Ich nenne Sie jetzt einfach A, B und C.
In diesen Ordner gibt es unter Ordner
AUDIO_TS #existiert nicht immer
VIDEO_TS #existiert immer
im VIDEO_TS Ordner gibt es 2 Dateien
Name unterschiedlich!
Audio: xyz.ac3 oder xyz.mp2
Video: xyz.mpv
Ich möchte nun das die Dateien im folgende Format dargestellt werdne in eine .txt Datei.
Txt Datei
Anwendung.exe "C:\Filme\A\xyz.mpv" "C:\Filme\A\xyz.mp2" "C:\Filme\A\A.mpg"
MPG-FIle soll so heisen wie der Ordner wo die Datei drinnen liegt (z. B.: A, B, C ...
Folgenden Ansatz hatte ich ich denke aber das es total Falsch ist.
Ich hoffe Ihr könnt mir helfen.
$filmArray = Get-ChildItem "C:\filme" | Format-List -Property Fullname
foreach ($lala in $filmArray)
{
$Video = Get-ChildItem $lala -Filter *.mpv -Recurse | Format-Table -property Fullname
$Audio = Get-ChildItem $lala -Filter *.ac3 and *.mp2 -Recurse | Format-Table -property Fullname
$Outfile = $Video $Audio
}
da ich leider noch ein Anfänger bin wende ich mich an euch.
Ich habe in C:\Filme
ganz viele Ordner mit Filmen
Ich nenne Sie jetzt einfach A, B und C.
In diesen Ordner gibt es unter Ordner
AUDIO_TS #existiert nicht immer
VIDEO_TS #existiert immer
im VIDEO_TS Ordner gibt es 2 Dateien
Name unterschiedlich!
Audio: xyz.ac3 oder xyz.mp2
Video: xyz.mpv
Ich möchte nun das die Dateien im folgende Format dargestellt werdne in eine .txt Datei.
Txt Datei
Anwendung.exe "C:\Filme\A\xyz.mpv" "C:\Filme\A\xyz.mp2" "C:\Filme\A\A.mpg"
MPG-FIle soll so heisen wie der Ordner wo die Datei drinnen liegt (z. B.: A, B, C ...
Folgenden Ansatz hatte ich ich denke aber das es total Falsch ist.
Ich hoffe Ihr könnt mir helfen.
$filmArray = Get-ChildItem "C:\filme" | Format-List -Property Fullname
foreach ($lala in $filmArray)
{
$Video = Get-ChildItem $lala -Filter *.mpv -Recurse | Format-Table -property Fullname
$Audio = Get-ChildItem $lala -Filter *.ac3 and *.mp2 -Recurse | Format-Table -property Fullname
$Outfile = $Video $Audio
}
Please also mark the comments that contributed to the solution of the article
Content-Key: 189306
Url: https://administrator.de/contentid/189306
Printed on: April 26, 2024 at 05:04 o'clock