Powershell Abfrage ob Datei in Ordner ist
Hallo
ich versuche momentan mir eine Datei wo der Name nicht bekannt ist, als Variable z.B [$file] auszugeben
Der Name der Datei ist immer unterschiedlich z.B 15246.file oder 58954.file
Kann mir hier evtl. jemand helfen?
ich versuche momentan mir eine Datei wo der Name nicht bekannt ist, als Variable z.B [$file] auszugeben
Der Name der Datei ist immer unterschiedlich z.B 15246.file oder 58954.file
Kann mir hier evtl. jemand helfen?
Please also mark the comments that contributed to the solution of the article
Content-Key: 568682
Url: https://administrator.de/contentid/568682
Printed on: May 4, 2024 at 17:05 o'clock
3 Comments
Latest comment
$file = gci 'D:\Ordner' -File -Filter *.file -Force | select -F 1
if($file){
write-host "Juhu File '$($file.Fullname)' ist da."
}else{
write-host "Nix da."
}
Ouhh, darauf einen Jedi- ähhh.. Jägermeister , Prost!