Skip to content

Instantly share code, notes, and snippets.

@alantsai
Last active November 24, 2015 10:00
Show Gist options
  • Save alantsai/d20d0f3b3e8714eda8a7 to your computer and use it in GitHub Desktop.
Save alantsai/d20d0f3b3e8714eda8a7 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment