Post by VanguardLHPost by Char JacksonPost by VanguardLHPost by n***@none.invalidI want to search more than directory on multiple drives for movie
files.
I would like to copy a title to the clipboard and pass it to a batch
file that will give me a hit if I get a match.
I have no batch file skillz.
Anyone care to write one for me?
Why not use a file search tool?
Search Everything from voidtools
Builds a database of filenames only (no contents of files). Very fast.
FileLocator Lite (aka Agent Ransack)
Can search on title and/or contents in files. Slow on first search
since it actually has to do a search instead of building up a filename
cache. Just as fast as Everything on 2nd and subsequent searches
(performed within the same instance of FileLocator) because it builds a
temporary cache. Its cache is discarded when you exit the program.
Mini-hijack: When I do a baseline search of my data drive, the search
completes in 59 seconds. If I immediately do the same search again, from
the same instance of Agent Ransack, it takes 42 seconds. The 3rd, 4th,
and 5th searches each also take 42 seconds.
Like I said, File Locator (aka Agent Ransack) builds a filename cache on
its first run, so each subsequent search is lightning fast.
Actually, that's why I jumped in. I don't see that behavior here on
Windows 7, 8.1, or 10. Subsequent searches in Agent Ransack are faster
than initial searches, but still very far from "lightning fast".
In my test described above, the initial search times for Everything and
Agent Ransack were 0 seconds and 59 seconds, respectively. Subsequent
searches took 0 seconds and 42 seconds, respectively. Unless I'm
misunderstanding, I think you're saying that subsequent searches in
Agent Ransack can also be 0 seconds, or very close to it. So far, I can
only force that behavior by drastically restricting Ransack's search
scope, so I must be missing something.
Post by VanguardLHOn the
other hand, Everything works like Windows Search in scanning the drive
even when not using it to build a database it uses for its search. You
don't notice the background database build by Everything, so the first
search in Everything is lightning fast.
Yes, I'm aware of how Everything works. What I'm wondering is why Agent
Ransack is still dog slow on subsequent searches. You're saying it's not
slow for you, so I'm thinking I missed a setting or something.
Post by VanguardLHAlas, quite often I need to find something *in* a file, especially
because I don't know what the file is named. Filelocator can search
inside. Everything cannot.
I'm aware of that. I very rarely need to search inside a file.
Interestingly, when I use Agent Ransack, it's almost always to find
something by its filename, a scenario where Everything would actually be
better suited.
Post by VanguardLHOf course, you can also configure the Windows Search service to not only
search on filenames but also on their contents. Updating the index will
take a LOT longer and its database will be a LOT bigger. If all you
need is to find by filename, you can also modify where Windows Search
will scan for files (beyond its minimal defaults).
I think everyone will agree that Windows Search is not playing in the
same ball game as Agent Ransack and Everything. Let's ignore that thing.
Post by VanguardLHPost by Char JacksonSo subsequent searches are definitely faster, but how can I make
subsequent searches take 0 seconds, as they do with Everything? Is there
a setting I've missed?
Everything builds its database in the background. It also catches file
I/O activity while it is active (and it always is since it runs as a
service). It knows when a file is created, deleted, or modified the
moment it happens and updates its database to immediately reflect the
change.
Yes, I'm aware of that.
Post by VanguardLHFileLocator will cache up the folder timestamps along with filenames on
its first run. On subsequent runs within the same instance of
FileLocator, it can skip any folders whose timestamps have not changed.
Since the folder hasn't changed, no files within the folder have
changed. But FileLocator isn't constantly monitoring the system calls
for file I/O to instantly detect and record file changes. Not until
FileLocator performs the 2nd, or later, searches can it detect if a
folder has changed its timestamp from a prior scan. It still has to
traverse the folder tree looking for changed folders.
Right, so is that an acknowledgement that Agent Ransack is not
significantly faster on subsequent searches? If so, then my instance of
Agent Ransack is, unfortunately, working as expected.
Post by VanguardLHI haven't timed FileLocator when doing content searches. I suppose it
could keep a hash of each file on the first run, and in subsequent runs
on files in changed folders, to see if the file has changed its hash --
or on a size change since that would be a much faster check via file I/O
calls than rehashing a file to check against a prior stored hash of a
file. However, a file could change in content but not change in size.
A byte is a byte no matter what character it represents and why I first
thought a hash of a file might get cached to detect if content changed.
Everything will always be much faster than FileLocator. Everything only
searches on filenames. It runs constantly in the background just like
Windows Search to keep indexing the files while you are doing something
else. It immediately catches changes (adds, deletes, renames) to
filenames. To search on content, use FileLocator; however, the only
time it access the file system is when it performs a search meaning it
still has to walk through the file system.
Everything runs as an indexing service (like Windows Search).
FileLocator is a user-mode process you load when you want to use it.
Yes, I'm aware of all of that.
Post by VanguardLHPost by Char JacksonPost by VanguardLHFileLocator Lite (aka Agent Ransack)
Can search on title and/or contents in files. Slow on first search
since it actually has to do a search instead of building up a filename
cache. Just as fast as Everything on 2nd and subsequent searches
(performed within the same instance of FileLocator) because it builds a
temporary cache. Its cache is discarded when you exit the program.
The part I'm currently unable to duplicate here is the claim that
"[Agent Ransack is] just as fast as Everything on 2nd and subsequent
searches". For me, on 3 Windows OS versions, I can't even get close to
that. Do you know what I might be missing?
--
Char Jackson