lastwritetimeは、PowerShellを使用し2010年3月26日午後9時を-geファイルをコピーします。
-
26-09-2019 - |
質問
私はlastwritetimeがより大きいまたは2010年3月26日午後9時と同じである別のディレクトリにあるディレクトリ内のファイルをコピーする必要があります。 I使用しています:
Get-ChildItem C:\pstest\hlstore\folder1\data | where-object {$i.lastwritetime -ge “3/26/2010 9:00 PM”} | Copy-Item -destination c:\pstest\hlstore2\folder1\data
しかし、何も起こらない...
すべてのヘルプをいただければ幸いです。
ありがとうございます。
エモ
解決
これを試してみてください
Get-ChildItem C:\pstest\hlstore\folder1\data | where-object {$_.lastwritetime -ge "3/26/2010 9:00 PM"} | Copy-Item -destination c:\pstest\hlstore2\folder1\data
"それは" where-object
における変数である$_
の名前ではなく、$i
ます。
また、これらの引用符ではなく“”
の""
、私はそれがまた失敗するだろうと思います。
所属していません StackOverflow