Search and Display - tool to work with files in binary mode

Discuss and share scripts and script files...
Post Reply
Julian
Posts: 48
Joined: 16 Dec 2022 08:24

Search and Display - tool to work with files in binary mode

Post by Julian »

In XY I missed the possibility to search through source files and similar text files in binary mode and open the list of file for easy view of the contents in text mode. So I created one.

With this program you can easily browse a list of files to open file one after each other. It will also display a list with text lines which contained the text you searched for. For source code files (and XML) my program supports syntax highlighting.

There is also an an integrated "shell" window which can be used to display a Context menu for certain files or as drag&drop source or -destination.

If you do not need to search for text, you can use this porogram also to display text files or binary files if they were text files.

This program may be used freely at your own risk, as long as it is only downloaded from my website:

https://www.fotoarray.com/searchanddisplay.html

Inbuilt search dialog:
sd_screen.png
sd_screen.png (46.58 KiB) Viewed 448 times
Open files in text mode with syntax highlighting.
sd_screen2.png
sd_screen2.png (145.33 KiB) Viewed 288 times
Commandline parameter:

list of files - will be added to the browser
-search Open the search dialog (F7)
-path parameter Set the path in search dialog
-mask parameter Set the mask in search dialog
-text1 parameter Set the first text entry field
-text2 parameter Set the second text entry field
-cs_yes Activate case sensitivity
-cs_no De-activate case sensitivity
-recursive Activate recursive search
-maxsize Set the maximum file size in kb

Example script to start from XYPlorer

Code: Select all

::openwith("""SearchAndDisplay.exe"" -search -path ""<curpath>"" -mask ""*.pas;*.dfm""" )
It also makes sense to create a catalog entry for
....SearchAndDisplay.exe

to send (all) the selected files to this program. The filenames will be listed in the list to the left and you can click ocertein items to open, not open all at once as it would be done in other programs. The files are opened readonly at start. To disable the readonly mode go to the "Edit" menu.

Note: In the search dialog the field paths and mask support lists of entries seperated by ";". Using drag&drop you can add paths and file names from XY.

Please let me know if there are ideas or questions.
Last edited by Julian on 21 Feb 2023 19:48, edited 2 times in total.

Julian
Posts: 48
Joined: 16 Dec 2022 08:24

Re: Search and Display - tool to work with files in binary mode

Post by Julian »

Version 1.1 is available now.

- The collected files are now displayed in a 2-level tree view, grouped by their parent directory.
- new commandline option -editmode All files are opened editable instead of readonly
- new commandline option -flatlist The list is shown in flat mode first (no treeview)
- it is possible to list files by name matching only, not by contents
- a separate window lists selected (or all contained) files in the current directory. This list supports Explorer commands and -Context menu
- CTRL+E will open DocX, RTF and WPT files in the inbuilt word processor

I hope somebody finds this useful.

Julian
Posts: 48
Joined: 16 Dec 2022 08:24

Re: Search and Display - tool to work with files in binary mode

Post by Julian »

Version 1.2 is available now.

- the internal search fill a list with all lines which contain the search text. This can be use to easily navigate to each found line.
- the search window has an include file mask and an exclude file mask.
- CTRL+F5 reloads the file which is currently displayed

The list in the lower left corner can now (optionally) display all files in the directory of the current file. It can also only display the files which match a certain filter.
Since this is a shell window you can use the shell context menu with each of the files. You can also use this window for drag&drop operations.
Doubleclick is supressed in this window, except for DocX, RTF and WPT files which will be opened in the inbuilt word processor.

It would be interesting to know if somebody uses this tool

Post Reply