473,624 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scanning a directory using javascript

Hi

I've got a question relating to using Javascript on an Intranet. I
have a directory with a list of files in the format week36.xls,
week37.xls
and I want to write a script that will scan all the files in the
directory and select the one with the highest week number then display
in the browser window. A brief search hasn't revealed any code to do
this so I just want to know if it is possible and what the function
names are that would be involved.

Cheers

Dean
Jul 20 '05 #1
2 17631
On Thu, 11 Sep 2003 07:04:57 -0700, Dean wrote:
Hi

I've got a question relating to using Javascript on an Intranet. I
have a directory with a list of files in the format week36.xls,
week37.xls
and I want to write a script that will scan all the files in the
directory and select the one with the highest week number then display
in the browser window. A brief search hasn't revealed any code to do
this so I just want to know if it is possible and what the function
names are that would be involved.

Cheers

Dean

Just learning JS, but my book tells me that without the use of
Certificates JavaScript cannot read or write files on the client computer,
the book is fairly old, but this is all to do with t5he secrity issue, if
you are on an intranet then the security issues should not be so
important.

I would be interested to know if this has changed, or what is required to
do so.
Jul 20 '05 #2
Dean wrote:
Hi

I've got a question relating to using Javascript on an Intranet. I
have a directory with a list of files in the format week36.xls,
week37.xls
and I want to write a script that will scan all the files in the
directory and select the one with the highest week number then display
in the browser window. A brief search hasn't revealed any code to do
this so I just want to know if it is possible and what the function
names are that would be involved.

Cheers

Dean


Client-side JavaScript, by itself, in the default security environment has
no access to the names of files in a directory on a web server. Without
some help from the server, client-side JavaScript by itself is unable to
retrieve a "directory listing". With the server's help (by simply listing
the contents of a directory when you request
http://yourserver/yourexcelfiles/, or by returning a page that lists the
contents of the directory) client-side JavaScript might have a chance of
loading that directory listing into a hidden iframe and parsing the
results. Of course, if you have server-side technology at your disposal to
generate such a list, then you could simply use that server-side
technology to choose the file with the newest date and display a link to
it, no client-side JavaScript would be required at all.

If you need to rely on a purely client-side solution, then you might be
able to make use of the Java applet available at:
<url: http://www.galasoft-lb.ch/myjava/Web...Demo/Demo.html />

But honestly, choosing a file from a directory on the server with specific
attributes and returning it to the browser is better suited to server-side
processing.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3227
by: Zen | last post by:
I'm using Access 2000, and I'd like to know if there is a way to use a scanner (flatbed, doc-feed, etc) to scan forms with OMR or OCR software, and have the data be automatically (or if not automatically then using a macro or other means) entered into tables. I guess the real question is do I need to use an expensive program to do this or is it codable suing Access/VB, and if it is codable, any suggestions as to how to start? Many...
4
2071
by: Nazgob | last post by:
Hello! I'm looking for cross-platform directory scanning library working with ansi C. I need to use in in GNU Linux and Windows. I need to do simple directory and files opertionson both OS, can you recomend me some solution? Thank you in advance. Regards, Nazgob
10
2070
by: Alan Searle | last post by:
I would like to scan a directory structure into XML to offer navigation functionality in HTML / XSL pages. My questions are: 1. Which is the best structure to store variable depth heirarchies in XML (i.e. different branches of the directory structure will have different 'depths'). 2. I am currently using VBA to prepare the pages and export to XML and
2
3190
by: Alan Searle | last post by:
I would like to 'grab' certain directory trees and then store them in a table. At the moment, I writing my own VBA to do this but I cannot help thinking that there must already be something (i.e. plug-ins or snippet of code) around that can do this. Can anyone advise me on this? And what is the most efficient/flexible way to store directory trees? At the moment I am planning to drop the directory tree into the following table:
6
3856
by: Bob Alston | last post by:
I am looking for others who have built systems to scan documents, index them and then make them accessible from an Access database. My environment is a nonprofit with about 20-25 case workers who use laptops. They have Access databases on their laptops and the data is replicated. The idea is that each case worker would scan their own documents, either remotely or back at the office. And NO I am not planning to store the scanned...
4
1368
by: tshad | last post by:
We have a few pages that accept uploads and want to scan the files before accepting them. Does Asp.net have a way of doing a virus scan? We are using Trendmicro to scan files and email but don't know if we can use it with our pages to handle files that our clients upload. Is there some type of API that would allow us to do this? I want to be able to Upload Word files using: <input id="MyFile" visible="true" style="width:200px"...
23
3731
by: Rotsey | last post by:
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took 13min on my 60 GB drive. I wanted it to be quicker.
7
2093
by: paul86 | last post by:
Hi all, I have a vb question that i'm hoping I can get some help with. I have a directory of excel files (probably about 1000) of them. They are quote sheets for the company I work for, and they are all the exact same format. I need to create some code in vb using microsoft access that will scan through this directory of excel files, and pull certain cells of information from each of them, and store this information into an access database....
8
5450
by: pinkskink | last post by:
I have a problem using a bar code scanner into a text area. I found on this forum someone with the same problem as me, except he thought the javascript wasn't finding the <GS> character \1D. http://bytes.com/groups/javascript/91022-control-charcters-form-input-field The problem is, the scanner isn't scanning it into the text area. Yet it does scan into Text Pad and when cutting and pasting it into the text area, javascript does find it....
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8625
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.