none
Powershell listing files with different creationtime and lastwritetime. RRS feed

  • คำถาม

  • Goodmorning everyone,

    I am trying to create a Powershell script that will list all files in a directory that have not matching CreationTime and LastWriteTime. So far, what I got is the following;

    Get-ChildItem -Path C:\MyPath -Recurse |  Where-Object {$_.CreationTime -ne $_.LastWriteTime}

    So far this is working as I need it to. However, I want to make a change to this script so it will only list the files that have more then 2 seconds difference in the creationtime and lastwritetime.

    Does anyone know how to accomplish this?

    Thanks and regards!


    • แก้ไขโดย FTLY 24 พฤษภาคม 2562 6:47
    24 พฤษภาคม 2562 6:46

ตอบทั้งหมด