File exists detection

Dec 1, 2012 at 7:59 PM


I'm trying to run simple following script (Script is placed in textBox in form) :

            if (System.IO.File.Exists(@"d:\Downloads\vcs_web.exe"))
               return "true"
                return "false""

The file exists on the path, so result should be "true", but result is..."false".

Calling JINT is following :

        private void button1_Click(object sender, EventArgs e)
            var engine = new JintEngine();
            var result = engine.Run(textBox1.Text);



Please can someone help me, what I'm doing wrong?...

Thank you

Mar 9, 2013 at 12:29 AM
I bet javascript doesn't need that @ sign in front of the string