Sometime, we come to a situation where we have to purge some files. The File-Purge has one more trick that it must be greater than LastWriteDate of a file.
Below code might help -
ls | where {$_.LastWriteTime -ge (ls | where { $_.name -eq "somd.flg" } ).LastWriteTime }
Below code might help -
ls | where {$_.LastWriteTime -ge (ls | where { $_.name -eq "somd.flg" } ).LastWriteTime }
No comments:
Post a Comment