Clicky

DeepYogurt
Hi,

Is there a way to create a list of filenames from what HoudahSpot shows after giving it all the criteria to look for? I would like to create the list with the fully qualified path so that I can put those names into a shell script to do things like rename or include in a log file as a multi-line list of pathnames when writing documentation.  

Ideally it would create the list based on only those highlighted since there are possibly many more in the complete list of results than I am interested in.

If it can't be done think this would make a great feature in a future release.

Thanks...

-Bob
0 0
DeepYogurt
Well, I discovered you can copy the highlighted entries in the HS window and paste to text file and all the filenames/pathnames get inserted into the text file all on one line. Which is exactly what I'm looking for - almost.

I can certainly edit this file to put only one file name path per line, but when the file contains dozens or hundreds or even a lot more this would be really difficult and very time consuming when paths have many different volume names.

So would suggest that you put some sort of capability into HS to put them out one line per pathname if possible.

Thanks very much. Really like HoudahSpot and use it all the time to find things and it works great!!!

-Bob
0 0
houdah
Hi!

Please try a different text editor or a spreadsheet application. The results should come out one by line.

You may also want to read this blog post.

Best,
Pierre Bernard
Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0 0
DeepYogurt

Pierre,

Thanks very much for the suggested blog posting - it's a great idea.

It made me think a bit more -- thought about using "vi" to parse the long string of pathnames on one line and think that this "vi" command should do the trick into splitting all the paths into one per line:

:%s/\([a-z] \)/\1^M/g

For those that don't know "vi" that well:

: -- starts a vi command in command mode
%s/ -- the substitute command (using the / as the delimiter)
\([a-z] \) -- remember the string "any lower case a thru z followed by a space character since all the path names are separated by a space character when you do the "paste" (aka Command-v after doing the Command-c in HoudahSpot)
/ -- the terminating delimiter of the search string
\1 -- is the string just remembered
^M -- this is the result of using control-v followed by control-m but only the control-m is shown
/ -- the terminating delimiter of the replacement string
g -- this says to do it for everything in each line.

Since there is only one line in the file with all the pathnames separated by a space after the Command-v paste operation, this would change it so that all the pathnames are now each on their own line. Note that when pathnames have a "space" as part of the name these spaces are preceded by the \ character when the "paste" operation occurs, so that's reason for the "[a-z] " as the search string finds the correct point where one pathname ends and the next begins. The only problem with this command would be if the final character of the pathnames were something besides a lowercase a thru z (like an uppercase character or some number or other special character). If that were the case you could modify the search string to take care of that situation too I believe.

If you're still puzzled by all this "vi" command mode stuff, suggest looking up the man page for "vi" or looking for web site that specializes in explaining "vi" command details - specifically search and replacement string details.

Well, I tried this "vi" command out and it worked fine. So now I can use HoudahSpot to create a list of pathnames, do a simple Command-C to copy all the pathnames, then open up a Terminal window, fire up "vi" and do a Command-v to paste the list of pathnames into the file (after first getting into "insert" mode), then exit "insert" mode and use the above command and VOILA...I now have a file with one fully qualified pathname on each line, ready to use for any sort of purpose I need to use it for.


Thanks again for the blog post hint - it's what got me pointed in the right direction.

-Bob

0 0