I'm trying to get *.xlsx files from the sftp server folder "/From/Outbound/TEST" using putty. I know it's something to do with the source path. I tried the below but nothing is working. Please please help.
"$Source/*.xlsx"
'$Source/*.xlsx'
$Source = "sftp@33.113.250.45:/From/Outbound/TEST"
[string]$TransferResults = & 'C:\Program Files\PuTTY\pscp.exe' -l 'user' -pw 'password' $Source/*.xlsx $Destination
I'm getting the below error:
pscp.exe : pscp: wildcard '*.xlsx' matched no files
At Test.ps1:29 char:31
+ [string]$TransferResults = & 'C:\Program Files\PuTTY\pscp.exe' -l 'user' - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (pscp: wildcard '*.xlsx' matched no files:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError