# How can we receive acknowledgement of file transfer using "SFTP"

**URL:** <https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404>\
**Category:** General\
**Created:** [19 December 2022 05:34 UTC](https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404 "2022-12-19T05:34:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SherrySri](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SherrySri](https://discourse.nodered.org/u/SherrySri)\
**Post date:** [19 December 2022 05:34 UTC](https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404/1 "2022-12-19T05:34:04Z")

</div>

HI Guys,  
In one of my project I am transfer a csv file from local PC to remote PC using SFTP.  
Since frequency of file transfer is more (every 30 sec) many times I am seeing loss of data. So, I want to ensure using some acknowledge bit after saving file on remote side before start of next file transfer.  
Please suggest !

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [19 December 2022 05:54 UTC](https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404/2 "2022-12-19T05:54:30Z")

</div>

Hi, Welcome to Node-RED. I don't think we can help you if you don't tell us how you run SFTP nor provide any information about what you have tried so far (code or screen shots of flow) and what happened (logs, error messages, etc).

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [19 December 2022 09:10 UTC](https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404/3 "2022-12-19T09:10:36Z")

</div>

> [@SherrySri](#):
>
> So, I want to ensure using some acknowledge bit after saving file on remote side before start of next file transfer.  
> Please suggest !

..not quite clear where the problem is.  
STFP over TCP normally will ensure, that the file is transfered properly and intact, when the transfer command returns with an OK.  
With a high latency/low bandwidth and low availability of a connection and also when the receiver side need to read the file first, before the next file gets sent, you could introduce some kind of semaphore file scheme.

Like:

- send DAT file first (data.csv)
- send SEM-file second (data.csv.OK)
- receiver side has to read the data file only when SEM file is there and then delete the SEM file afterwards
- send the next data file iteration only when SEM file has been deleted by the remote side.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 February 2023 09:11 UTC](https://discourse.nodered.org/t/how-can-we-receive-acknowledgement-of-file-transfer-using-sftp/72404/4 "2023-02-17T09:11:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
