Announcement

Collapse
No announcement yet.

Can not write to file

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

  • Can not write to file

    eSignal 7.2-544
    Windows XP

    This use to work, not working now. File is never opened.
    Have tried different open options. Any suggestions?
    ---------------------------------
    function preMain() {

    var f = new File("test.txt");
    f.open("w+");
    if (!f.isOpen())
    debugPrintln("Could not open file");
    else {
    debugPrint("File opened");
    f.writeln("Test Line");
    f.close();
    }
    }

    function main() {}

  • #2
    tickler,

    I ran the code you posted and the file was created with the Test Line string. I verified this in \eSignal\Formula Output\ folder and the EFS Output Window. Are you still having this problem? If so, what version of eSignal are you running?
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      Thanks for your reply. A phrase in your question made me realize what I was doing wrong. At some time, I have changed the EFS setting "Output" directory, and later deleted that directory.

      The "Formula Output Root" directory must exist before the "f.isOpen" and the f.writeln" commands work.

      Thanks
      Ronny

      Comment

      Working...
      X