Page 1 of 1

Remove files from hierarchy

Posted: Tue Dec 08, 2020 1:02 pm
by LasseThid
Hi.

I need to create a flow for web orders which will delete the files for a cancelled order.
My thoughts was to pick up the name of the files from the subject of the cancellation mail. Use that to inject the file from the file server and remove it from the file server once injected into the flow, where it would be sent to a recycle bin.
However, I don't know where in the hierarchy the files are. On the file server there are a variable amount of folders whose names start with the delivery date and then contains which shipping method that is to be used.
Does anyone have any ideas on how to solve this?

Thanks in advance
Lasse

Re: Remove files from hierarchy

Posted: Tue Dec 08, 2020 2:14 pm
by jan_suhr
I think it would be better if that webform created a webhook that Switch could use to find the file. And don't your order database know where the file is? This would be a much better approach than using emails.

Re: Remove files from hierarchy

Posted: Tue Dec 08, 2020 2:44 pm
by LasseThid
Unfortunately there is no database involved in this flow.

The customer uploads pdf files and xml files to our ftp server and a Switch flow will read data from the xml file and place the pdf file and the xml file in the correct folder in the hierarchy.

If the customer for some reason cancels a job we receive an e-mail with that information and the CSR has to manually search the hiearchy and delete the pdf and xml files.

I guess that if I place a copy of the xml files in another folder I could then use that xml file to read the delivery date and shipping method and hence find the files to delete. 8-)

Re: Remove files from hierarchy

Posted: Wed Dec 09, 2020 1:08 pm
by laurentd
Have a look at the inject wildcard app, you can inject files when you only have part of the name and you can scan a hierarchy.
https://www.enfocus.com/en/appstore/pro ... t-wildcard

Re: Remove files from hierarchy

Posted: Tue Dec 15, 2020 8:35 am
by LasseThid
Thanks Laurent.

I will give that a try.