This is driving me bananas. I am assuming I am missing something stupid, but I have tried about 10 different formats and nothing works.
This is the code I am running:
$today=$(Get-Date -Format o)
$destfile = "C:\SEA-FTP\toFTP\SEAInfo-$today.csv"
$srcfile = "C:\SEA-FTP\temp\QueryCSVTempMstr.csv"
Copy-Item $srcfile -Destination $destfile
This is the error message:
Copy-Item : The given path's format is not supported.
At C:\SEA-FTP\BCP_SQL_Script-v1.0.ps1:53 char:10
+ Copy-Item <<<< $srcfile -Destination $destfile
+ CategoryInfo : NotSpecified: (:) [Copy-Item], NotSupportedException
+ FullyQualifiedErrorId : System.NotSupportedException,Microsoft.PowerShell.Commands.CopyItemCommand
I know there are a million questions with this in Google search, but it looks like I am doing what they are doing. Any thoughts on the format?