Access file system with HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Ponting

    Access file system with HTML

    Hi

    Is it possible to do basic file system access within HTML?
    I want to be able to do the following tasks to a known full path and
    filename

    Delete (with warning prompt if possible)
    Open
    Open containing folder
    Get the files properties

    The html documents is a local html file generated by a script that searches
    for certain files based on a file pattern (*.tmp, *.bak, *.wbk etc) and
    builds a html documents which I would like to use as a front end to managing
    the files it has reported on. The html document will not be running on a
    web server, only on a network drive.

    Thanks


  • Harlan Messinger

    #2
    Re: Access file system with HTML


    "Paul Ponting" <paul_ponting@h otmail.com> wrote in message
    news:brvo89$ogd $1@hercules.bti nternet.com...[color=blue]
    > Hi
    >
    > Is it possible to do basic file system access within HTML?
    > I want to be able to do the following tasks to a known full path and
    > filename
    >
    > Delete (with warning prompt if possible)
    > Open
    > Open containing folder
    > Get the files properties
    >
    > The html documents is a local html file generated by a script that[/color]
    searches[color=blue]
    > for certain files based on a file pattern (*.tmp, *.bak, *.wbk etc) and
    > builds a html documents which I would like to use as a front end to[/color]
    managing[color=blue]
    > the files it has reported on. The html document will not be running on a
    > web server, only on a network drive.
    >
    > Thanks[/color]

    HTML doesn't do anything but lay out text and graphics files. If you mean,
    can you do all these things with scripting, then that would be a question
    for a scripting (or Javascript) newsgroup.

    Comment

    • Edward Alfert

      #3
      Re: Access file system with HTML

      "Paul Ponting" <paul_ponting@h otmail.com> wrote in
      news:brvo89$ogd $1@hercules.bti nternet.com:
      [color=blue]
      > Hi
      >
      > Is it possible to do basic file system access within HTML?[/color]
      <snip>

      no, HTML is client side and you need service side processing. You need to
      use perl, php, or other server side scripting language.

      --
      Edward Alfert - http://www.rootmode.com/
      Discount Code (Recurring 25% Off): newsgroup
      Multiple Domain Hosting * Reseller Hosting
      Free IP Addresses * Private Label Nameservers

      Comment

      • Andrew Graham

        #4
        Re: Access file system with HTML

        Paul Ponting wrote:[color=blue]
        > Hi
        >
        > Is it possible to do basic file system access within HTML?
        > I want to be able to do the following tasks to a known full path and
        > filename
        >
        > Delete (with warning prompt if possible)
        > Open
        > Open containing folder
        > Get the files properties[/color]

        Have a look at:
        Gain technical skills through documentation and training, earn certifications and connect with the community


        Andrew Graham


        Comment

        • Harlan Messinger

          #5
          Re: Access file system with HTML


          "Andrew Graham" <andrewgraham.a t.att.net@nospa m.invalid> wrote in message
          news:p_JEb.2166 06$Ec1.7770188@ bgtnsc05-news.ops.worldn et.att.net...[color=blue]
          > Paul Ponting wrote:[color=green]
          > > Hi
          > >
          > > Is it possible to do basic file system access within HTML?
          > > I want to be able to do the following tasks to a known full path and
          > > filename
          > >
          > > Delete (with warning prompt if possible)
          > > Open
          > > Open containing folder
          > > Get the files properties[/color]
          >
          > Have a look at:
          > http://msdn.microsoft.com/workshop/a...taoverview.asp[/color]

          I love this line from there:

          "Internet Explorer is so forgiving that even the missing html and body tags
          do not cause an error. "

          1. Accepting bad code is a feature!!!

          2. Guess what, Microsoft: the html and body tags--both opening and
          closing--*are* optional in an HTML document. So it's a *good thing* that
          their absence doesn't cause an error, because otherwise that would be one
          *more* deviation from the standard.

          Comment

          • Stan Brown

            #6
            Re: Access file system with HTML

            In article <brvo89$ogd$1@h ercules.btinter net.com> in
            comp.infosystem s.www.authoring.html, Paul Ponting wrote:[color=blue]
            >Is it possible to do basic file system access within HTML?
            >I want to be able to do the following tasks to a known full path and
            >filename
            >
            >Delete (with warning prompt if possible)[/color]

            HTML is not a programming language. It is a way to mark op the
            structure of documents so that a program (typically a Web browser)
            can display the text in an appropriate way.

            HTML can't do _anything_ to affect the viewer's system.

            --
            Stan Brown, Oak Road Systems, Cortland County, New York, USA

            HTML 4.01 spec: http://www.w3.org/TR/html401/
            validator: http://validator.w3.org/
            CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
            2.1 changes: http://www.w3.org/TR/CSS21/changes.html
            validator: http://jigsaw.w3.org/css-validator/

            Comment

            • Dave Patton

              #7
              Re: Access file system with HTML

              "Paul Ponting" <paul_ponting@h otmail.com> wrote in
              news:brvo89$ogd $1@hercules.bti nternet.com:
              [color=blue]
              > Hi
              >
              > Is it possible to do basic file system access within HTML?
              > I want to be able to do the following tasks to a known full path and
              > filename
              >
              > Delete (with warning prompt if possible)
              > Open
              > Open containing folder
              > Get the files properties
              >
              > The html documents is a local html file generated by a script that
              > searches for certain files based on a file pattern (*.tmp, *.bak,
              > *.wbk etc) and builds a html documents which I would like to use as a
              > front end to managing the files it has reported on. The html document
              > will not be running on a web server, only on a network drive.[/color]

              Not that I think it's the best approach, but you can accomplish
              what you want to do without doing "file system access within HTML".

              You already have some sort of scripting provision, and you presumably
              have something to render HTML. If your existing script generates
              HTML that has URLs of the form

              then so long as you have webserver software setup on the system
              that will be using the generated HTML, where the webserver software
              understands that you want it to execute the "filetodelete.s cript" file
              and pass it the query string "somefile.t mp", then you can do it.

              Currently, you are just using HTML as the means to format(i.e. markup)
              the data in the report produced by the existing script. Why not use
              the scripting language's features(if it has them) to interact with the
              user in regards to what to do with the files, or use a different
              scripting language, etc.

              --
              Dave Patton
              Canadian Coordinator, the Degree Confluence Project
              http://www.confluence.org dpatton at confluence dot org
              My website: http://members.shaw.ca/davepatton/
              Vancouver/Whistler - host of the 2010 Winter Olympics

              Comment

              • Paul Ponting

                #8
                Re: Access file system with HTML

                Andrew

                Thanks for this insight, I had never heard of HTA's
                After a brief look on the web, I have managed to convert the output html
                file into a working HTA file which basically just emulates exactly what the
                html did (i.e. just markup)

                I have done a search but cannot find code that will allow me to delete a
                file, open the containing folder of a file or access the file properties.

                The file format is

                \\servername\vo lume\folder\fil e.ext


                Any ideas?

                "Andrew Graham" <andrewgraham.a t.att.net@nospa m.invalid> wrote in message
                news:p_JEb.2166 06$Ec1.7770188@ bgtnsc05-news.ops.worldn et.att.net...[color=blue]
                > Paul Ponting wrote:[color=green]
                > > Hi
                > >
                > > Is it possible to do basic file system access within HTML?
                > > I want to be able to do the following tasks to a known full path and
                > > filename
                > >
                > > Delete (with warning prompt if possible)
                > > Open
                > > Open containing folder
                > > Get the files properties[/color]
                >
                > Have a look at:
                > http://msdn.microsoft.com/workshop/a...taoverview.asp
                >
                > Andrew Graham
                >
                >[/color]


                Comment

                • Andrew Graham

                  #9
                  Re: Access file system with HTML

                  Paul Ponting wrote:[color=blue]
                  > "Andrew Graham" <andrewgraham.a t.att.net@nospa m.invalid> wrote in
                  > message
                  > news:p_JEb.2166 06$Ec1.7770188@ bgtnsc05-news.ops.worldn et.att.net...[color=green]
                  >> Paul Ponting wrote:[color=darkred]
                  >>> Is it possible to do basic file system access within HTML?[/color]
                  >>
                  >> Have a look at:
                  >>[/color][/color]
                  http://msdn.microsoft.com/workshop/a...taoverview.asp[color=blue][color=green]
                  >>
                  >> Andrew Graham[/color][/color]
                  [color=blue]
                  > Andrew
                  >
                  > Thanks for this insight,[/color]

                  You're welcome!
                  [color=blue]
                  > I have done a search but cannot find code that will allow me to
                  > delete a file, open the containing folder of a file or access the
                  > file properties.
                  >
                  > Any ideas?[/color]

                  Sample code:
                  function Delete(filespec ) {
                  var fso = new ActiveXObject(" Scripting.FileS ystemObject");
                  f = fso.GetFile(fil espec);
                  f.Delete();
                  }
                  ...
                  <body onload="Delete( 'c:\all\my\impo rtant\informati on.txt')">

                  These pages will get you started, and closely linked pages have sample
                  code:

                  <http://msdn.microsoft.com/library/de...y/en-us/script
                  56/html/vtoriMicrosoftW indowsScriptTec hnologies.asp>

                  <http://msdn.microsoft.com/library/de...y/en-us/script
                  56/html/jsobjfile.asp>

                  I'd say we're off topic now. if you have more questions you should head
                  over to one of the Microsoft scripting groups.

                  Andrew Graham


                  Comment

                  Working...