windows file search result to html

chaz_mac

Board Regular
Joined
Mar 9, 2007
Messages
76
Looking for a method to get a list of results for a file search put into HTML format. google has proved time consuming and useless so far ...

requirements:

any application must not require privilege to install (no messing with the registry)

ideally, the folder in which the file resides would be presented as a hyperlink

free is preferable ...

I'm asking the smartest people on the planet - they are on this board, I'm convinced.

Chaz
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,831
Office Version
  1. 365
Platform
  1. Windows
Chaz

Is this really an Excel question? Is that all you have to work with?

Where exactly is the destination of this file list going to be, a web page?

Or are you trying to create hyperlinks?
 

chaz_mac

Board Regular
Joined
Mar 9, 2007
Messages
76
Not necessarily an Excel question -

although Excel can work -

i want to search a folder and all its subfolders for filename.extension, filename.extension.gz, or filename.extension.Z

the file name should appear in a cell, and the folder name in the next cell, ideally the folder name would be a clickable link.

i want the folder name to be hyperlinked, so i can go there and click on file names I wish to open - the associated program works better if the current explorer window is open on the proper folder.

i thought there may be a program that already does this, so the effort of writing an Excel macro would not be needed, although fun ...

Chaz
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,831
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Chaz

I still don't quite understand what you want to do.

One thing that's kind of thrown me is that you mentioned GZ files, aren't those compressed files used in Linux?

If this is a web thing then I'm pretty sure you'd be able to find something out there to do what you want, perhaps JavaScript, PHP, VBScript...:)
 

chaz_mac

Board Regular
Joined
Mar 9, 2007
Messages
76

ADVERTISEMENT

Yes, gz means gzip, typically used on Unix or Linux systems. It has the advantage that it will not corrupt large files (>2GB) as Winzip will.

Files this large are related to finite element modeling of reasonably large systems.

I would like a permanent record of the Windows search, as it save all locations of these files. If the folder is a hyperlink, i can open it with a click and launch my modeling application.

i have seen a small program that hyperlinks the file and shows the directory in an HTML table, this is actually not too bad.

I know I can do what I want with an Excel Macro, as well.

Chaz
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,831
Office Version
  1. 365
Platform
  1. Windows
Chaz

I'm still not getting this, sorry.

Do you just want to create a listing in Excel of all the GZ tarballs in a particular directory and a hyperlink for each file?

If you do why not just use FileSystemObject?

This will list all the files in a directory and there file types.
Code:
Option Explicit
 
Sub GetAllGZ()
Dim scr As Object
Dim fldr As Object
Dim fil As Object
Dim rng As Range
 
    Set scr = CreateObject("Scripting.FileSystemObject")
    
    Set fldr = scr.GetFolder("C:\Downloads")
    
    Set rng = Range("A1")
    
    For Each fil In fldr.Files
        rng = fil.Name
        rng.Offset(, 1) = fil.Type
        Set rng = rng.Offset(1)
    Next fil

End Sub
Probably not exactly what you want but it could be a start

I'm pretty sure there's a way to filter for file types/extensions and creating the hyperlinks shouldn't be a problem.

If you want to do this for all folders not just a specific folder you'll need to use some sort of recursion.

There's plenty of examples of both filtering and recursing kicking about.

Oops, just downloaded tweedle's workbook - makes my code look pretty lame.:)
 

chaz_mac

Board Regular
Joined
Mar 9, 2007
Messages
76
Not exactlly -

I wish to list, in a directory and all its subdirectories, files whose names have a specific extension. If it were .txt, i would search for *.txt, *.txt.gz, and *.txt.Z

I would like to list each file and the folder it is located in, with the folder being a hyperlink.

Searching using file explorer shows me the information i need, but i do not know of a way to save that information to a file I can reference.

thus the desire to find a program of some kind that will save the info.

Chaz
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,831
Office Version
  1. 365
Platform
  1. Windows
Chaz

I did say what I posted was probably not what you wanted but, for me anyway, it's becoming even unclearer.

Like I said about the hyperlinks and subfolders, that can be done - same for the listing the folder.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,993
Messages
5,526,118
Members
409,685
Latest member
Bellybb

This Week's Hot Topics

Top