AlanTsai
11/24/2015 - 9:58 AM

display all files under directory with LastWriteTime (Last Modify Time) and full file path order by LastWriteTime. 取得目前資料夾的所有檔案的最後修改時間和檔案路徑的

display all files under directory with LastWriteTime (Last Modify Time) and full file path order by LastWriteTime. 取得目前資料夾的所有檔案的最後修改時間和檔案路徑的Table,依照最後修改時間排序. #powershell

 # inspire from https://rcmtech.wordpress.com/2010/08/12/powershell-find-files-modified-after-a-certain-date/
 
 dir -File -recurse | Sort-object LastWriteTime -desc | format-table lastwritetime, fullname -autosize
 
 # 匯出到檔案 files.txt
 dir -File -recurse | Sort-object LastWriteTime -desc | format-table lastwritetime, fullname -autosize | out-dir files.txt