Airport Retail Enterprises - Gatwick - Grain Store File Processing

Created by Jon Mitchell, Modified on Mon, 23 Jan, 2023 at 9:09 AM by Jon Mitchell

Uses microsoft flow to grab weekly email sent at 23:15 on Sunday with sales info for previous week - part of the "flow" is renaming to "ARE.CSV"


The powershell script is set to run after this time which does a couple of things:


  1. microsoft flow puts it in original folder
  2. Renames the file to ARE_xxxxx (where xxxxxxx is the current date) as the sales file contains a date for each row i don't think this is too important.
  3. It keeps a copy of the original file with the date
  4. Moves it to pipe which then replaces "," with "|" and also removes last blank row
  5. Renames to grainstore_xxxxxx.csv (xxxxx is date)


TO REGENERATE A FILE


Log on to touchoffice.net and run the gatwick export report for required date range


Save as csv and name it ARE.CSV 


Put it in Original folder


Run gatwick.ps1 (this needs to be done on master till as looking at particular file locations)


This will create a ARE_XXXXXX.csv in original for todays date - might be best to delete this file


GRAINSTORE_XXXXXX.csv should now be in SFTP folder, this can be sent to gatwick via email etc.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article