Re: Can't get attributes of file 'file.txt'.
Thanks for the log.
This bug has been added to the tracker:
https://winscp.net/tracker/1655
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
I'm changing one of the processes slightly where I'm passing in the source dir, dest dir, current date, host IP, user id, password and protocol as paramenters. I've loaded the WinSCPnet.dll.
I've created an array of two files M2MUMMDD.dat and M2MCMMDD.dat. I've then opened a session i.e. $session = New-Object WinSCP.Session $session.Open($sessionOptions).
I'm then looping through the file array and checking if the file exists $session.FileExists($path) where $path is /D:/bbsfiles/mucc/. This is the actual path. I had tried to use just /bbsfiles/mucc/ in my previous process but it did not work.
$session.FileExists is always returning false. I even added Write-Host $session.Opened to ensure that the session was in fact opened and it was.
I manually logged in using WinSCP.exe to ensure that the file was there and it is.
I'm not sure if this is related to this bug or not.
Thoughts?
This issue has been resolved. After working with "Martin" it was discovered that the file names I had in my script did not match the case of the files at the vendor. Once I had adjusted my scripts and tested I was no longer receiving the original error reported in this post.
This also resolved the issue I reported above.
Thank you so much for your help!