Search
« How to Trigger DiffMerge from XYplorer | Main | Say No to Folders in Workflow »
Friday
Oct282016

How to Trigger File Locator Lite from XYplorer

A month or two ago I had a bit of a problem with Windows Explorer and Google Drive that was rather painful. I lost a day of work to putting right an issue that simply shouldn't have occurred and to be honest I'm quite glad it happened to me and not one of my colleagues as I imagine that for many of them things would have ended a lot worse. It was at this point that I began looking at alternatives to Windows Explorer.

I figured there must be better options out there and probably ones with powerful features I could utilise. I wasn't wrong. There were quite a number. I settled on one that I have been incredibly happy with and appears to be rock solid with some amazing features. I expect I'll blog about quite a few of the ways I'm using my new file manager; starting today with just a simple little tweak that I found rather useful that involves another file management tool I use on a frequent basis.

XYplorer

After a lot of consideration the file manager I settled on is XYplorer Pro. It has a long history and a great set of features. It is also under constant development with an active community providing even more support and ideas. It was exactly the sort of thing I was looking for.

At 40 USD it certainly wasn't the cheapest file manager out there (plenty of free ones can certainly be found including a less feature rich version of this application), but after trialling it for just a couple of days I felt confident it was well worth the price and bought a license.

The Other Tool

The other tool I eluded to earlier is FileLocator Lite an aptly named file search application. I've always found Microsoft's own disk indexing solutions to be somewhat problematic with occasional errant results and frequent drains on system resources. FileLocator is a search utility that does not rely on indexes (though the Pro version can) and so is definitely slower than indexed solutions, but I find that it is fast enough for my purposes, provides a good interface with good utility and most importantly does not slow my machine down the rest of the time.

My Minor Gripe

File Locator Lite is available on the folder context menu in Windows Explorer and it is available on the folders within XYplorer; both in-pane and the tree view. However I typically don't have the tree view displayed. I find I navigate step by step just as quickly as by navigating a separate tree and in fact often jump straight to a location via just typing in the path. As a result I don't actually display the tree in XYplorer in my default set-up.

However this then means that if I've navigated to a particular folder and wish to carry out a FileLocator Lite search from that folder down I don't have that folder immediately available anywhere to right click on and select the option. i either have to show the folder tree navigation first, then run it and then hide the tree or navigate in the pane to the parent folder, initiate FileLocator Lite and then navigate back.

All far too much hassle for such a configurable file manager. Instead I've made use of a simple one line script (if you can really call a one line script a script) and a custom button to make this whole process even easier by making it just a single click to trigger FileLocator Lite at the desired location (note you can also tie it to a keyboard short cut).

The Solution

FileLocator Lite has a command line option whereby you can pass in a path and the application will open and set its search parameter selection to be the path specified. This is specified by including a "-d" switch followed by the path to use.

XYplorer's internal scripting language includes a command to run a command line statement. It's unsurprisingly called "Run". The scripting language also includes application variables, one of which is "curpath" which is populated with the path of the currently viewed folder in the currently active pane (XYplorer can have dual file panes displayed).

Therefore the following statement can be used to open FileLocator Lite for the active pane's currently viewed folder.

run """C:FilesLite.exe"" -d """""

Notice that there are a lot of double quotes in there. Each pair of sequential double quotes is an "escaped" double quote for use in side a string within double quotes. If we didn't have those then there would be multiple sets of strings rather than strings within strings. It becomes a bit easier to read if I replace the escaped double quotes with some back ticks - but please note it is the statement above that should be used; this is for display purposes only.

run "C:\Program Files\Mythicsoft\FileLocator Lite\FileLocatorLite.exe -d <curpath>"

The run command is simply passed a single command line string. That string contains the file path to the FileLocator Lite executable followed by the -d switch and finally the path from XYplorer. So why are the double quotes required? Well that's because the paths potentially contain spaces and any paths with spaces must be enclosed in double quotes ... which for this purpose must be "escaped" within the string for the Run command. Hence we have a lot of double quotes to make sense of.

I added a custom button to my toolbar, created a FileLocator Lite icon and assigned both the icon and the command to it.

Now to open FileLocator Lite I just click on one button.

The same process can of course be used for lots of command line utilities and scripts. As long as you can run them from the command line you can use exactly the same approach to process or take action against a folder in the same way. There are also XYplorer variables for other things such as the currently selected file(s) and so you may also wish to consider what other ways you might be able to take advantage of this over and above what the existing context and send-to menus might permit for such selections.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>