Finds the most recent file.
Find-NewestFile.ps1 [[-Files] <FileInfo[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
ls C:\java.exe -Recurse -ErrorAction Ignore |Find-NewestFile.ps1
Directory: C:\Program Files (x86)\Minecraft\runtime\jre-x64\1.8.0_25\bin
Mode LastWriteTime Length Name —- ————- —— —- -a—- 2017-02-05 15:03 190888 java.exe
The list of files to search.
Type: FileInfo[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.