List changed files

Welcome Forums General PowerShell Q&A List changed files

This topic contains 1 reply, has 1 voice, and was last updated by

3 years, 4 months ago.

  • Author
  • #29207

    Points: 0
    Rank: Member


    Is there a way I can create a list of files that are on D: but not in F:, are in F:\ but not in D and have changed in F: since a particular date?
    Am trying to use GCI and compare-object but am getting mixed up with the options

  • #29208

    Points: 0
    Rank: Member

    This is what I currently have:

    $srce = Get-ChildItem -Path F:\HSTVDATA\HSTV_Share -Recurse | Select-Object -Property FullName, Length, LastWriteTime
    $dest = Get-ChildItem -Path D:\HSTVDATA\HSTV_Share -Recurse | Select-Object -Property FullName, Length, LastWriteTime
    Compare-Object $srce $dest -Property FullName, Length, LastWriteTime | Format-Table- Autosize | Out-String -Width 4096 | Out-File C:\Tony\Compare.txt

The topic ‘List changed files’ is closed to new replies.