powershell過濾器刪除檔案名稱中的.pdf副檔名

powershell過濾器刪除檔案名稱中的.pdf副檔名

我正在嘗試使用 powershell 來獲取資料夾中的所有子元素,我正在使用的程式碼是

Get-ChildItem -Recurse -path C:\clntfiles

這段程式碼給出的輸出如下

Mode                LastWriteTime     Length Name                                                                      
----                -------------     ------ ----                                                                      
-a---         4/29/2015   9:11 AM    6919044 HD 100616 Dec2014.pdf  
-a---          5/1/2015  11:42 AM    7091019 HD 101642 Jan2015.pdf    

我不想要沒有 .pdf 副檔名的模式 lastWriteTime 長度和檔名

輸出應該是這樣的

Dec2014
Jan2015

我不知道如何過濾它。請指教

答案1

Get-ChildItem -Recurse C:\clntfiles | Select BaseName

相關內容