Command for Robocopy to log created date

霸气de小男生 提交于 2019-12-13 07:45:55

问题


I'm using Robocopy's log feature to get file information regardless of folder depth (from Learn-PowerShell).

I was able to get a file's timestamp using /TS option of Robocopy, but this timestamp is modified date of the file. I also need to log the created date.

So how can I log created date of file?

And another one, how to log Modified date and Created date of folder too, using Robocopy?


回答1:


if you can find a computer with PowerShell v5 you can install a module called PSAlphaFS .

Install-Module PSAlphaFS

copy the module to your system running powershell 4 and import it.

Import-module PSAlphaFS

then run the following command which is similar to get-childitem but without the 260 char limitation.

Get-LongChildItem -Path C:\temp -Recurse | 
  Select-Object Name,FullName,CreationTime,LastWriteTime


来源:https://stackoverflow.com/questions/34429999/command-for-robocopy-to-log-created-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!