I get this error after successfully opening a session:
PS C:\Users\rtbt\Documents\FTP PowerShell Scripts> $session.ListDirectory("`'`AAA.AAA.AAAA.`'") Exception calling "ListDirectory" with "1" argument(s): "Error listing directory ''AAA.AAA.AAAA.''. Could not retrieve directory listing CWD cmd failed : EDC5129I No such file or directory." At line:1 char:1 + $session.ListDirectory("`'`AAAA.AAA.AAAA.`'") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) , MethodInvocationException + FullyQualifiedErrorId : SessionRemoteException
I am using FTP with Explicit TLS encryption in Active Mode. When I use the GUI I can connect to the AAA.AAA.AAAA directory successfully and download the target file. I am using the following syntax in the GUI for the remote directory (disregard the outer pair of double quotes): "'AAAA.AAA.AAAA.'"
This inclines me to think that either a) I'm not correctly escaping the single quotes in PowerShell or b) the directory pathing code is different in the .NET assembly.
Any guidance here? Are paths like these supported in the .NET Assembly?