Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Get-ChildItem where is property -LiteralPath?

$
0
0
I needed to move files (using powershell V2) finely I found one liner to do the job,to my understanding Move-Item use -LiteralPath parameter --- (Accept pipeline input? true (ByPropertyName))but how it submitted to Move-Item if Get-ChildItem has no property name LiteralPath (only Fullname)Get-ChildItem -Path C:\Application\Log\*\*.Log | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-90) } | Move-Item -Destination { "\\NASServer\Archives\{0}\" -f $_.Directory.Name } example taken from --https://becomelotr.wordpress.com/2013/04/30/event-1-my-way/

Viewing all articles
Browse latest Browse all 467

Trending Articles