John Glisson (Customer) asked a question.

ls and stat commands return different timestamps

We are having an issue, using the BizTalk Server 2020 SFTP adapter as a client for a MoveIT SFTP server. BizTalk uses WinSCP as its underlying client.

 

What occurs is that BizTalk will send the ls command to retrieve a list of files to download. It downloads a file successfully. However, prior to deleting the file will issue the stat command, which returns a different timestamp than the previous ls command. This difference signifies to BizTalk that a change has occurred in the file, and as such it does not delete the file.

 

This is a pretty big issue. The result is that BizTalk will download the file over and over again, never deleting it, since it appears to have been changed as mentioned.

 

This is a log on the command line.

  1. winscp> ls
  2. -rw-rw-rw- 0 0 0 117 Jun 19 12:25:00 2020 TEMP.txt
  3. D--------- 0 0 ..
  4. winscp> stat TEMP.txt
  5. -rw-rw-rw- 0 117 Jun 19 12:25:10 2020 TEMP.txt

Is there a version, patch or hotfix where the ls command has been fixed?


  • John Glisson (Customer)

    More...note that the command line shows a 10 second difference in the timestamps. The ls command always displays seconds as :00.