Test-SFTPPath and Get-SFTPChildItem not seeing directories created after first use.
I have a script that is constantly looping and a part of the loop is to do a test-sftpPath for a specific folder. If that folder exists it triggers an if statement. This works fine the first run through, however, if I create the folder it is checking for while the script is still running it wont show in get-sftpchilditem or test-sftppath until you use the module to update some other file in the directory or start a new sftp session.
What is the target server ? It could be caching the information
Sent from my iPhone
On Jan 31, 2020, at 6:03 PM, Chris4678 [email protected] wrote:
I have a script that is constantly looping and a part of the loop is to do a test-sftpPath for a specific folder. If that folder exists it triggers an if statement. This works fine the first run through, however, if I create the folder it is checking for while the script is still running it wont show in get-sftpchilditem or test-sftppath until you use the module to update some other file in the directory or start a new sftp session.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.