如何检查sftp中的特定文件已更改 [英] how to check a specific file in a sftp is changed

查看:100
本文介绍了如何检查sftp中的特定文件已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要检查sftp站点,并且将有多个文件上传到一个文件夹.我正在编写逻辑应用程序来处理文件.每个逻辑应用程序都会处理一个文件,因为每种文件格式都不同.问题是sftp触发器只能检测到更改 到文件夹中的任何文件.因此,如果文件发生更改,该文件的逻辑应用程序将运行,但是其他逻辑应用程序也将运行,这是不希望的.

我尝试使用重复触发,然后通过路径操作通过sftp获取文件内容,但是如果指定的文件不存在,那将失败,我想要的是逻辑应用程序刚刚退出或根本没有被触发. /p>

如果特定文件已更新/上传,如何仅触发逻辑应用程序?

解决方案

最近我正在阅读Wagner Silveria的一篇文章,指出我们可以添加触发器条件.

请找到以下内容

https://notetoself.tech/2018/12/18/logic-app-trigger-conditions/#respond

他使用HTTP请求触发器和Dynamics 365进行了尝试.您可以尝试并更新它是否也适用于SFTP.

您可以尝试检查文件名或其他类似如下的条件

https://stackoverflow.com/questions/41841702/using-sftp-file-name-in-logic-apps

谢谢

Sujith.


Need to check a sftp site and there will be multiple files been uploaded to a folder. I am writing logic apps to process the files. Each logic app will handle one  file because each file format is different. Problem is sftp trigger can only detect change to ANY file in the folder. So if a file changes, the logic app for that file will run, but OTHER logic apps will run as well which is not desired. 

i have tried use recurrence trigger then followed by a sftp get file content by path action but that will fail if the file specified does not exist, what I want is the logic app just quit or better not been triggered at all.

How to just trigger the logic app if a particular file is updated/uploaded?

解决方案

Hi,

Recently i was reading an Article from Wagner Silveria stating that we can add Trigger condtions.

Please find the below

https://notetoself.tech/2018/12/18/logic-app-trigger-conditions/#respond

He tried it with HTTP Request trigger and Dynamics 365. You can try and Update whether it works with SFTP as well.

You can try checking the filename or some other criteria Like below

https://stackoverflow.com/questions/41841702/using-sftp-file-name-in-logic-apps

Thanks,

Sujith.


这篇关于如何检查sftp中的特定文件已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆