Connecting Tech Pros Worldwide Help | Site Map

Access file system with HTML

Paul Ponting
Guest
 
Posts: n/a
#1: Jul 20 '05
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
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Access file system with HTML



"Paul Ponting" <paul_ponting@hotmail.com> wrote in message
news:brvo89$ogd$1@hercules.btinternet.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.

Edward Alfert
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Access file system with HTML


"Paul Ponting" <paul_ponting@hotmail.com> wrote in
news:brvo89$ogd$1@hercules.btinternet.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
Andrew Graham
Guest
 
Posts: n/a
#4: Jul 20 '05

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:
http://msdn.microsoft.com/workshop/a...taoverview.asp

Andrew Graham


Harlan Messinger
Guest
 
Posts: n/a
#5: Jul 20 '05

re: Access file system with HTML



"Andrew Graham" <andrewgraham.at.att.net@nospam.invalid> wrote in message
news:p_JEb.216606$Ec1.7770188@bgtnsc05-news.ops.worldnet.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.

Stan Brown
Guest
 
Posts: n/a
#6: Jul 20 '05

re: Access file system with HTML


In article <brvo89$ogd$1@hercules.btinternet.com> in
comp.infosystems.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
http://OakRoadSystems.com/
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/
Dave Patton
Guest
 
Posts: n/a
#7: Jul 20 '05

re: Access file system with HTML


"Paul Ponting" <paul_ponting@hotmail.com> wrote in
news:brvo89$ogd$1@hercules.btinternet.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
http://your.local.webserver/filetode...t?somefile.tmp
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.script" file
and pass it the query string "somefile.tmp", 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
Paul Ponting
Guest
 
Posts: n/a
#8: Jul 20 '05

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\volume\folder\file.ext


Any ideas?

"Andrew Graham" <andrewgraham.at.att.net@nospam.invalid> wrote in message
news:p_JEb.216606$Ec1.7770188@bgtnsc05-news.ops.worldnet.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]


Andrew Graham
Guest
 
Posts: n/a
#9: Jul 20 '05

re: Access file system with HTML


Paul Ponting wrote:[color=blue]
> "Andrew Graham" <andrewgraham.at.att.net@nospam.invalid> wrote in
> message
> news:p_JEb.216606$Ec1.7770188@bgtnsc05-news.ops.worldnet.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.FileSystemObject");
f = fso.GetFile(filespec);
f.Delete();
}
...
<body onload="Delete('c:\all\my\important\information.tx t')">

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/vtoriMicrosoftWindowsScriptTechnologies.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


Closed Thread