{"id":253,"date":"2016-03-24T15:30:57","date_gmt":"2016-03-24T14:30:57","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=253"},"modified":"2017-11-28T22:06:46","modified_gmt":"2017-11-28T21:06:46","slug":"find-changed-files-using-powershell","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2016\/03\/24\/find-changed-files-using-powershell\/","title":{"rendered":"find changed files using PowerShell"},"content":{"rendered":"<p>Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddHours(-24) -and $_.FullName -like &#8222;f:\\go2005\\*.c*&#8220; } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(&#8218;F:&#8216;,&#8217;F:\\svn\\f&#8216;); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}<\/p>\n<p>Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddMonths(-10) -and $_.FullName -like &#8222;S:\\go2005\\application\\*.cfm&#8220; } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(&#8218;S:&#8216;,&#8217;D:\\Users\\Frick\\Documents\\sw0052sync\\server\\f&#8216;); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}<\/p>\n<p>Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddMonths(-10) -and $_.FullName -like &#8222;S:\\go2005\\application\\*.cfc&#8220; } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(&#8218;S:&#8216;,&#8217;D:\\Users\\Frick\\Documents\\sw0052sync\\server\\f&#8216;); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddHours(-24) -and $_.FullName -like &#8222;f:\\go2005\\*.c*&#8220; } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(&#8218;F:&#8216;,&#8217;F:\\svn\\f&#8216;); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;} Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddMonths(-10) -and $_.FullName -like &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2016\/03\/24\/find-changed-files-using-powershell\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":1,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/253\/revisions\/298"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}