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

Home Posts Topics Members FAQ

search for specific filename from folder

Fary4u
273 Contributor
Hi

i've got folder with lots of images on it,
what i would like to do is trying to seach the specific image filename
using ( FileSystemObjec t ) & textbox

i've got this code that can search the files in folder bringing full list of file.

Expand|Select|Wrap|Line Numbers
  1.     set FileSysObj=CreateObject("Scripting.FileSystemObject")
  2.     strFileAndPath = request.servervariables("SCRIPT_NAME")
  3.     strPathOnly = Mid(strFileAndPath,1 ,InStrRev(strFileAndPath, "/"))
  4.     strFullPath = server.mappath(strPathOnly)
  5.     set fldr=FileSysObj.GetFolder(strFullPath)
  6.  
  7.     set FileList = fldr.Files
  8.     For Each FileIndex in FileList
  9.         'This bit excludes this page (and other asp files) from the list of links
  10.         if Lcase(right(FileIndex.Name, 4)) <> ".ini" then
  11.             Response.Write("<A HREF='" & FileIndex.name & "'>" & FileIndex.name & "</A><BR>")
  12.         end if
  13.     Next
  14.  
IS ANY BODY KNW HOW TO GET CRACK ON TO ACHIVE THIS RESULT ?
May 12 '09 #1
2 3674
Fary4u
273 Contributor
any body kw\ssssssssssss sssssssssssssss ssssssssss
Thxs in advance
May 13 '09 #2
GazMathias
228 Recognized Expert New Member
This bit:

Expand|Select|Wrap|Line Numbers
  1.  Response.Write("<A HREF='" & FileIndex.name & "'>" & FileIndex.name & "</A><BR>")
  2.  
Becomes:

Expand|Select|Wrap|Line Numbers
  1. If instr(FileIndex.name,"[YOUR TEXT HERE]") >0 Then
  2. Response.Write("<A HREF='" & FileIndex.name & "'>" & FileIndex.name & "</A><BR>")
  3. End if
Obviously you need to feed the [YOUR TEXT HERE] bit with something.

Gaz
May 14 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
15638
by: Ben | last post by:
Greetings, I am looking for a way to search for and delete files based on a pattern mask. For example, the search method would find all files matching a certain pattern containing wildcards (e.g. *FILE29*.TXT). I'm looking for a way to do this in either Visual Basic or C(++). Thanks!
1
8713
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast, returned the hyperlinked page title, filename, and the body txt (30 preceding and following words) in context with the search word highlighted. ...
0
4212
by: Chung Leong | last post by:
Here's a short tutorial on how to the OLE-DB extension to access Windows Indexing Service. Impress your office-mates with a powerful full-text search feature on your intranet. It's easier than you think. First, download and install the extension (http://sourceforge.net/project/showfiles.php?group_id=171247&package_id=198554). Simply unzip...
3
9544
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and MusicAlbum let you find MP3 and other music files based on the singer and album name; DocAuthor let you find Office documents created by a certain user;...
2
1069
by: pa2ratczi | last post by:
Hi there, am having trouble with my program, its a file locator program just like a search engine in a local drive: heres wat i have coded: Private Sub Command1_Click() Dim SearchFile As String Dim FileName As String If Drive1.Drive = "c:" Then SearchFile = Dir$("C:\*.*") While SearchFile <> ""
2
1746
by: Krustov | last post by:
I wrote this a while ago and found it comes in very handy at times . For example , If you want to know what webpages use a certain stylesheet its just a matter of typing in the stylesheet name and searching for it .. If found , It will display the *****.php filename and the line number the stylesheet was found on . Obviously you can...
5
7553
by: Alice | last post by:
I'm trying to upload all .txt files from a specific folder using the following code, but it didn't work. HELP The problem lies in DoCmd.TransferText acImportFixed, "Imperial Import Specification", TableName:="1089_daily", FileName:="myFile", False, "" where myFile is defines as myFile = Dir("C:\Temp\test\*.txt") ... but error occurs ...
7
7372
by: molle | last post by:
Hi! Does anyone know a searchscript to create a javascript file-search. I want it to be able to search for a specific filename in a folder INCLUDING its sub-folders. I know there is a way to search a folder for a file but not its sub-folders, here is what I got: function findFile(Npath){
0
10746
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not...
0
7918
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...
0
8206
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. ...
0
8340
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...
1
7967
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...
0
8220
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...
1
5713
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...
0
5392
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...
1
2353
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
0
1185
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...

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.