I am trying to find a solution to the following (I think with Linq):
I need to pull certain files from a larger list of files on an ftp server with a similar file name. For example, we send an order file to a company for processing, then return an answer file that we can download.
So, I can send them the files "order_123.txt" and "order_456.txt". After some time, I need to search and download answers for those files that will be called "order_123.resp" and "order_456.resp". A kicker is that in some cases I can have several answers, in which case they would create "order_123-1.resp" and "order_123-2.resp", and also the files would not be deleted from the server.
I know this can be achieved by scrolling through the files that I know I need answers to then skip all the files on the server until I find the files that match, but I hope I don't need to go through the files on the server more than once.
This example may help clarify:
I sent "order_222.txt" and "order_333.txt", they processed them, and the ftp server contains: "Order_111-1.resp" "Order_001.resp" "Order_222-1.resp" "Order_222-2.resp" "Order_333.resp"
I need to upload 3rd, 4th and 5th files.
Thank.
source
share