Powershell .NET Create an Array of files from Remote Dir
how would i go about creating an array of files from the remote directory once i am logged in?
this is what i want to do, but on the remote side.
the asterisk is there because that part of file name is a time stamp. the time is random.
would this be the most efficient method or is there a better alternative?
any help is greatly appreciated..
this is what i want to do, but on the remote side.
$YYMD = ((Get-Date).AddDays(-1).ToString("yyyyMMdd"))
$arr = Get-ChildItem | Where-Object { ($_.name -match "ASSIGNMENTS_" + $YYMD + "*") -or ($_.name -match "PAYMENTS_" + $YYMD + "*") }
foreach ($a in $arr)
{
### Download files
}the asterisk is there because that part of file name is a time stamp. the time is random.
would this be the most efficient method or is there a better alternative?
any help is greatly appreciated..