473,763 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

searching a specific file in a directory

Hi!

I'm new to javasript, and i must confess to have borowed a few free scripts
from the net to satisfie my needs....

Still i can't find even an idea of ascipt to do this...
Please Help!!!

I have a webserver setup in my home, with an index file that is an access
comtrol page, that, if the authentication is sucessfull, takes the user to a
specific directory.
In this directory I only have image files in .jpg format.

I need to create a page were the user can either browse the entiry
directory, or specify a filename to search for, wildcards enabled, and
beiing able to see a reduced size image in the result page when hovering the
image/file result link.
Any Ideas?

Thnaks in advance, and sorry if my question seems too long or messy....

Paulo
Aug 21 '06 #1
1 1378

Psapg wrote:
Hi!

I'm new to javasript, and i must confess to have borowed a few free scripts
from the net to satisfie my needs....

Still i can't find even an idea of ascipt to do this...
Please Help!!!

I have a webserver setup in my home, with an index file that is an access
comtrol page, that, if the authentication is sucessfull, takes the user to a
specific directory.
In this directory I only have image files in .jpg format.

I need to create a page were the user can either browse the entiry
directory, or specify a filename to search for, wildcards enabled, and
beiing able to see a reduced size image in the result page when hovering the
image/file result link.
Any Ideas?
Use normal file sharing? :-)

The solution is best done server-side, which might be written in
JavaScript but probably would be better in some other language. A
script-based, client-side solution to generate image thumbnails would
be very inefficient; using it to generate document thumbnails is
probably impossible for all practical purposes. Having them generated
every time a visitor comes to the page would be plain wasteful and very
inelegant.

Some OS's allow you to specify actions when the contents of a directory
are changed, others allow a program to run a set intervals to check if
the contents have changed. A script could generate the thumbnails and
update the index page accordingly whenever a file is added or removed
(or shortly thereafter).

There are plenty of programs to generate image thumbnails, but
generating document thumbnails would remain a real challenge if various
file formats are to be supported.

The 'search and display' part could be done easily in JavaScript,
provided the listing and thumbnails are already available and the user
has some idea of how to use regular expressions.
--
Rob

Aug 21 '06 #2

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

Similar topics

2
2532
by: John | last post by:
Hi everyone ! This is a first time I post a message here. If I post my message in a wrong group. Please ignore it. I am trying to build a website which allows users (can be thousands of users, supposedly) to upload their files to their designaged directories (max 15 files for each user). A super user (can be more than one) want to search for a particular file name and also a particular textual part of a file of all user's files in all...
4
1643
by: James | last post by:
We have a need to search through an entire drive for a specific file name. The process is currently written with recursive loops through each directory and the Scripting.FileSystemObject. Problem is, it takes forever. When I do a standard file search through Windows Explorer, it typically finds the file I'm looking for within 5 seconds. Is there another approach to file searching, or am I stuck with trying to make this recursive loop...
2
1533
by: Mark Reed | last post by:
Hi all, I don't know if this is do-able but you never know until you ask. A situation at work has arisen where I have to trawl through over 500 text files, copy the contents and then paste them into an Excel sheet where it is analysed. Would it be possible to copy the files, paste them into a 'reserved' directory and get Access to import the contents of all the file in one go? The first line and last line of these text files would need to...
1
1182
by: trialproduct2004 | last post by:
Hi all, I am having C# application which is accepting file name and directory name. What i want is to check whether file present in given directory or not. Directory can have sudirectories in it. So i want searching to be for innnermost folder also.
29
2658
by: jaysherby | last post by:
I'm new at Python and I need a little advice. Part of the script I'm trying to write needs to be aware of all the files of a certain extension in the script's path and all sub-directories. Can someone set me on the right path to what modules and calls to use to do that? You'd think that it would be a fairly simple proposition, but I can't find examples anywhere. Thanks.
2
2076
by: neilio2j | last post by:
hi, can anyone tell me how to search a given directory using C++? so far i have been successful in searching a file named, for tags"h:\\tags.cpp", whereas i would like to search for all files in the entire h: directory. this is the code i have used for searching the file named, "h:\\tags.cpp", /*char filename; cout<<"Please enter the filename";
5
2590
by: peruron | last post by:
Hello again! I've been discussing the advantages of Python over C-Shell. I was asked if I can replace the use of "grep" in searching for a specific string in a multi-file directory - I have to go through all the files, and find all the occurrences of a specific string. Can anyone suggest an idea? Thanks!
4
1602
by: jodleren | last post by:
Hi! I wonder, which way to do this fastest. I have a disk, where I need to search for a file or directory. I do it recursively, meaning that I start from the top dir, then I add all directories to an array, and by a counter I work my way through that array. And, while doing that I add the directory or file (name) to and result
2
1081
Markus
by: Markus | last post by:
I'm trying to search through a specified file path (C:\\Users\<name>) and then delete specified file types. The code below works, but it only goes 1 sub-directory deep. Does anyone know how I could modify this so that it searches every possible directory under the specified path. static void Main(string args) { DirectoryInfo DirInfo = new DirectoryInfo(@"C:\\Users\Chris"); GetDirs(DirInfo);
0
9998
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...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
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
6642
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
5270
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
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2793
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.