Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Check file in JavaScript

Check file in JavaScript

Scheduled Pinned Locked Moved JavaScript
javascripttutorialquestion
4 Posts 3 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ShafiqA
    wrote on last edited by
    #1

    Hi guys. How can i check Wheather file exist in paricular location or not i saw some example but its not working. Your answer would be helpful for me... Thanks Shafiq

    K Y 2 Replies Last reply
    0
    • S ShafiqA

      Hi guys. How can i check Wheather file exist in paricular location or not i saw some example but its not working. Your answer would be helpful for me... Thanks Shafiq

      K Offline
      K Offline
      koolprasad2003
      wrote on last edited by
      #2

      TRY it out

      function CheckFile()
      {
      var fso = new ActiveXObject("Scripting.FileSystemObject");
      FileExist = fso.FileExists("TEST.txt");
      if (FileExist == true){
      alert("True")
      }
      else
      {
      alert("FAIL");
      }
      }

      Rating always..... WELCOME Be a good listener...Because Opprtunity knoughts softly...N-Joy

      S 1 Reply Last reply
      0
      • K koolprasad2003

        TRY it out

        function CheckFile()
        {
        var fso = new ActiveXObject("Scripting.FileSystemObject");
        FileExist = fso.FileExists("TEST.txt");
        if (FileExist == true){
        alert("True")
        }
        else
        {
        alert("FAIL");
        }
        }

        Rating always..... WELCOME Be a good listener...Because Opprtunity knoughts softly...N-Joy

        S Offline
        S Offline
        ShafiqA
        wrote on last edited by
        #3

        Hey koolprasad Thanks for reply. I already tried this it works only in case of IE (after change security setting in internet option Activexcontrol safe enable=enable which is not safe) and in another browser its not working... what i am missing or what i need to do to work in all browser, without change in setting becouse client is not going to change in setting. please share ur Idea Thanks... Shafiq

        1 Reply Last reply
        0
        • S ShafiqA

          Hi guys. How can i check Wheather file exist in paricular location or not i saw some example but its not working. Your answer would be helpful for me... Thanks Shafiq

          Y Offline
          Y Offline
          Yusuf
          wrote on last edited by
          #4

          You can not access client file, unless you use Activex and give special permission. Just think what could happen if javascript are allowed to access client files.

          Yusuf May I help you?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups