image
 
image
Windows Apps


Windows Applications
These applications are mostly text processing and file management tools. The majority are Java applications, are delivered as JAR files, and require that you have a late model Java run time installed. There are some .NET executables that require the presence of a recent version of Microsoft's .NET Framework. There are also some old-fashioned stand-alone executables.

Downloading and using all of the Java apps is done as follows:
  1. Download the application. You will receive a ZIP file containing the application (in the form of an executable JAR file), a ReadMe text file, a CMD (batch) file to simplify launching the application from the command line, and 2 or 3 JAR files that the application needs to run.
  2. Create and/or select a directory (folder) that you would like the application stored in and run from.
  3. Extract all the files in the ZIP file into the directory.
  4. Launch the CMD (batch) file that is provided - AppName.cmd with the "-h" help switch on the command line to see the application's detailed usage instructions.


Dedup     DeleteBlankLines     DetabAndTrimFile     DirectoryPruner     EntabAndTrimFile     Find     FindDuplicateFiles     Prime     SequenceFileNames     Subs     Tabularize

Java App:    Dedup
This program eliminates duplicate lines in all the files specified by the command line parameters. Eliminating duplicate lines does not mean just eliminating consecutive duplicate lines. If two lines -- each located anywhere in the file -- are the same, only the first one is retained in the resulting file.

Java App:    DeleteBlankLines
This program deletes all the empty lines in all the files that are specified by the command line arguments.

Java App:    DetabAndTrimFile
This program replaces all the tabs in all the files that are specified by the command line arguments with the appropriate number of spaces and trims any whitespace from the end of the lines.

Java App:    DirectoryPruner
This program prunes files and subdirectories from a "TARGET" directory if those files and subdirectories are not present in a "MASTER" directory. The pruning process consists of deleting any files or subdirectories found in the TARGET directory but not fond in the MASTER directory. Both the TARGET and MASTER directories must be specified on the command line and each must be the name of one and only one directory. Therefor, no wildcard characters are allowed in the names.

Java App:    EntabAndTrimFile
This program replaces all the spaces in all the files that are specified by the command line arguments with the appropriate number of tabs and spaces and trims any whitespace from the end of the lines.

Java App:    Find
This program finds and lists all the file names that are specified by the command line arguments.

Java App:    FindDuplicateFiles
This program finds all the duplicate files among the files that are specified by the command line arguments. It does a file content comparison, not a file name comparison. It compares every file specified with every other file specified. If two files are the same size, it does a byte-by-byte comparison of the files' contents. It writes the results out to a text file (./DuplicateFiles.txt) as well as to the screen. Here is an example of the output that is written to the console screen:
                                          [00051] Processing: !Unsorted\1946.Dad.jpg
                                          [00052] Processing: !Unsorted\1948.AllensParents-JeanAndJimBaker.jpg
                                             equals: 1948\1948.AllensParents-JeanAndJimBaker (2).jpg
                                             equals: 1948\1948.AllensParents-JeanAndJimBaker.jpg
                                          [00053] Processing: !Unsorted\1948.MomAndDadWedding.2.jpg
                                          [00054] Processing: !Unsorted\1948.MomAndDadWedding.jpg
                                       
And here is an example of the same output as it is written to the file:
                                          "!Unsorted\1948.AllensParents-JeanAndJimBaker.jpg"  "1948\1948.AllensParents-JeanAndJimBaker (2).jpg"
                                          "!Unsorted\1948.AllensParents-JeanAndJimBaker.jpg"  "1948\1948.AllensParents-JeanAndJimBaker.jpg"
                                       
Actually, for each file, the entire fully-qualified file name (File.getCanonicalPath()) is written out. I have lopped off the beginning of the file names in this sample output to shorten the lines.

The intent of the file output is to make it easy to make a batch (cmd) file to delete the duplicates and/or rename the duplicate files to match, or whatever else you may want to do to address the duplicates.

I use this program mostly to find duplicate photos. Since it looks at the content of files, it can find two files that contain exactly the same photo even if they are in different directories and/or have different file names. I have a lot of photos saved from various sources and it is common to end up with duplicates of many of them. Since I keep all photos in one directory tree, I can just run this program in the root directory of that tree using the "recurse" option and it will find every photo in the tree that is duplicated anywhere else in the tree. All the files compared do not have to be in the same tree of course, they can be anywhere and all the locations can be specified on this program's command line. All the files in all the locations specified on the command line are compared to each other.


Java App:    Prime
This program, when given a number N between 0 and 2,147,483,647 (inclusive) generates a list of all the prime numbers in the range of MAX(0, N-100) .. MIN(2147483647, N+100). N, if it is prime will be in the list. Here are 2 examples:
                                          +------------------------------------------------------+
                                          |              Output when Prime is passed             |
                                          +--------------------------+---------------------------+
                                          |    A prime number        |       A non-prime number  |
                                          |         N=101            |             N=100         |
                                          +--------------------------+---------------------------+
                                          |      2 is prime.         |          2 is prime.      |
                                          |      3 is prime.         |          3 is prime.      |
                                          |      5 is prime.         |          5 is prime.      |
                                          |      7 is prime.         |          7 is prime.      |
                                          |     11 is prime.         |         11 is prime.      |
                                          |     13 is prime.         |         13 is prime.      |
                                          |     17 is prime.         |         17 is prime.      |
                                          |     19 is prime.         |         19 is prime.      |
                                          |     23 is prime.         |         23 is prime.      |
                                          |     29 is prime.         |         29 is prime.      |
                                          |     31 is prime.         |         31 is prime.      |
                                          |     37 is prime.         |         37 is prime.      |
                                          |     41 is prime.         |         41 is prime.      |
                                          |     43 is prime.         |         43 is prime.      |
                                          |     47 is prime.         |         47 is prime.      |
                                          |     53 is prime.         |         53 is prime.      |
                                          |     59 is prime.         |         59 is prime.      |
                                          |     61 is prime.         |         61 is prime.      |
                                          |     67 is prime.         |         67 is prime.      |
                                          |     71 is prime.         |         71 is prime.      |
                                          |     73 is prime.         |         73 is prime.      |
                                          |     79 is prime.         |         79 is prime.      |
                                          |     83 is prime.         |         83 is prime.      |
                                          |     89 is prime.         |         89 is prime.      |
                                          |     97 is prime.         |         97 is prime.      |
                                          |  -----------------       |      -----------------    |
                                          |    101 is prime.         |        101 is prime.      |
                                          |  -----------------       |        103 is prime.      |
                                          |    103 is prime.         |        107 is prime.      |
                                          |    107 is prime.         |        109 is prime.      |
                                          |    109 is prime.         |        113 is prime.      |
                                          |    113 is prime.         |        127 is prime.      |
                                          |    127 is prime.         |        131 is prime.      |
                                          |    131 is prime.         |        137 is prime.      |
                                          |    137 is prime.         |        139 is prime.      |
                                          |    139 is prime.         |        149 is prime.      |
                                          |    149 is prime.         |        151 is prime.      |
                                          |    151 is prime.         |        157 is prime.      |
                                          |    157 is prime.         |        163 is prime.      |
                                          |    163 is prime.         |        167 is prime.      |
                                          |    167 is prime.         |        173 is prime.      |
                                          |    173 is prime.         |        179 is prime.      |
                                          |    179 is prime.         |        181 is prime.      |
                                          |    181 is prime.         |        191 is prime.      |
                                          |    191 is prime.         |        193 is prime.      |
                                          |    193 is prime.         |        197 is prime.      |
                                          |    197 is prime.         |        199 is prime.      |
                                          |    199 is prime.         |                           |
                                          +--------------------------+---------------------------+
                                       

Java App:    SequenceFileNames
This program renames all the files that are specified by the command line arguments. Each file is given a new file name that includes a sequential number starting with 000. A control is provided that lets the user specify a number different than 000 to begin the sequencing. There are also options for adding a prefix and/or a suffix to the number.

Here are some examples. Assume a directory contains these files:

                                          +----------------+
                                          | Original Name  |
                                          +----------------+
                                          |   tunaw.jpg    |
                                          |   tunax.jpg    |
                                          |   tunay.jpg    |
                                          |   tunaz.jpg    |
                                          +----------------+
                                       
Then this table shows the files' names before on the left and after on the right if SequenceFileNames is run in its default mode.
                                          +---------------+-------------+
                                          | Original Name |  New Name   |
                                          +---------------+-------------+
                                          |  tunaw.jpg    |   000.jpg   |
                                          |  tunax.jpg    |   001.jpg   |
                                          |  tunay.jpg    |   002.jpg   |
                                          |  tunaz.jpg    |   003.jpg   |
                                          +---------------+-------------+
                                       
This table shows the files' names before on the left and after on the right if SequenceFileNames is run with a prefix of "New." specified.
                                          +----------------+----------------+
                                          | Original Name  |    New Name    |
                                          +----------------+----------------+
                                          |   tunaw.jpg    |   New.000.jpg  |
                                          |   tunax.jpg    |   New.001.jpg  |
                                          |   tunay.jpg    |   New.002.jpg  |
                                          |   tunaz.jpg    |   New.003.jpg  |
                                          +----------------+----------------+
                                       
This table shows the files' names before on the left and after on the right if SequenceFileNames is run with a suffix of ".Old" specified.
                                          +----------------+----------------+
                                          | Original Name  |    New Name    |
                                          +----------------+----------------+
                                          |   tunaw.jpg    |   000.Old.jpg  |
                                          |   tunax.jpg    |   001.Old.jpg  |
                                          |   tunay.jpg    |   002.Old.jpg  |
                                          |   tunaz.jpg    |   003.Old.jpg  |
                                          +----------------+----------------+
                                       

Java App:    Subs
This program performs a global string search and replace in all the target files specified on the command line. You can specify the string to find and the string to replace it with on the command line. If you have multiple different strings to find and replace, you can make a substitutions file containing all the find/replace string pairs and pass the name of the file to Subs on the command line. Subs takes each find/replace string pair in turn from the command line and/or substitutions file and performs a global search and replace within the target file.

Java App:    Tabularize
This program tabularizes all the lines in all the target files specified on the command line. It reads the file, determines the maximum width for each column, and then reformats the file using the maximums for each column. For example, if a file comprises these lines:
                                       1,22,333,4444,55555
                                       1,22,333,4444,55555
                                       11111,2222,333,44,5
                                       1,22,333
                                       
then tabularizing the file using the default delimiter (comma) and separator (comma) will change it to look like this:
                                       1,    22,  333,4444,55555
                                       1,    22,  333,4444,55555
                                       11111,2222,333,44,  5
                                       1,    22,  333
                                       
tabularizing the file using the default delimiter (comma) and three spaces as the separator will change it to look like this:
                                          1       22     333   4444   55555
                                          1       22     333   4444   55555
                                          11111   2222   333   44     5
                                          1       22     333
                                          1       22     333