Announcement

Collapse
No announcement yet.

Accessing external data and files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing external data and files

    I have a study which accesses data from a web site. This is a holiday file. Very simple, each line contains a date which is a market holiday.

    When the indicator loads this file is read once and the dates are stored in an array. So far, so good.

    Sometimes, the web site is down and so the file cannot be read.

    The solution that I am thinking of is to read the holiday file from the web site and write it to the local drive and on subsequent loads read it locally. Again, no problem with this.

    The problem is that I want the local file to be updated from the server every (say) 1 week. Correct me if I'm wrong but there is no way to get the write date of a local file from EFS is there?

    Anybody have any ideas how to solve this? i.e. The ability to download a data file on an ad hoc basis from a server...
    Standing on the shoulders of giants.

  • #2
    Hello wildfiction,

    I'm not aware of method for reading the wrtie date of a file.

    How about putting the current date as the first line of the file from within your routine that writes the web data to the file? On subsequent days, your formula would then compare the date on the first line of the local file to the current PC date and then either read from the file or attempt to update the file from the web data if more that a week as elapsed.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thanks Jason. I was hoping not to have to do that but I think that's the best solution.

      I suppose the other alternative is to use a DLL and a Win32 function to read and return the file's write date.
      Standing on the shoulders of giants.

      Comment

      Working...
      X