Reindex
Reindex
File(s):
Type:
1st Version:
Actual Version:
Compatibility:
Reindex.exe
command line application
Winter 1998
1.5 (August 2008)
DOS shell running under Windows 2000, XP, Vista
Description

Reindex is a simple command line application for any DOS shell running under Windows. It lets you rename numbered file sequences.

You want a picture sequence to start at 0 instead of 1? You have one of these strange interlaced picture sequences (pic.1.1.pic, pic.1.2.pic, pic.2.1.pic, pic.2.2.pic, ...) and want to have a normal progressive sequence with leading zeros (picProg001.pic, picProg002.pic, picProg003.pic,...)? Reindex will help you!

I have been using this little program for nearly ten years now and in came in handy so many times I stopped counting.

Download, Installation and Usage

The ZIP file containing the program can be downloaded here: download ZIP file (Reindex.1.5.zip).

Installation: extract the ZIP file and copy Reindex.exe into the Windows directory (typically "C:\Windows").

Usage: open a DOS shell and enter "reindex" followed by <Return>. Some help and two brief examples are displayed. Below you will find more detailed examples on how to use Reindex.

Example 1

Here is an example in which a picture sequence is renamed and reindexed, just to have it the way we want.
Let's say we have the following picture sequence in the directory "C:\Temp":

myseq.1.pic
myseq.2.pic
...
myseq.99.pic
myseq.100.pic

Let's assume we want the name of the sequence not to be "myseq" but "zerobased". Also, we want it to start at 0 instead of 1. And finally, we want leading zeros for our indexes.

We would enter the following line in a DOS shell:

Let's dissect that line:

  1. the first parameter: "myseq.*.pic"
    The name of the input file sequence we want to rename. Note that a '*' has been placed where the indexes are located.
  2. the second parameter: "1"
    The amount of digits used at the minimum to represent an index in the input file sequence. It has no leading zeros so this value is set to 1.
  3. the third parameter: "1"
    The first index of the input file sequence.
  4. the fourth parameter: "100"
    The last index of the input file sequence.
  5. the fifth parameter: "1"
    The step value when going from the first to the last index. We want to rename all files from 1 to 100, so the step value is set to 1.
  6. the sixth parameter: "zerobased.*.pic"
    The name of the output file sequence. Note that a '*' has been placed where the indexes are to be located.
  7. the seventh parameter: "3"
    The amount of digits used at the minimum to represent an index in the output file sequence. We want all indexes to have three digits, so this value is set to 3.
  8. the eighth parameter: "0"
    The first index of the output file sequence. We want it to start at zero, so this is set to 0.
  9. the nineth parameter: "1"
    The step value for the output sequence.

Now hit the return key, wait a second, and you will see this in your shell:

All files were renamed and no errors occured. So far, so good. Reindex is still running and waiting for you to tell it if you want to undo the renaming or not. This actually gives you the chance of opening a file explorer and check if the file sequence was renamed as you wanted. If this should not be the case, you can undo the renaming by simply pressing the 'Y' key.

The resulting sequence:

zerobased.000.pic
zerobased.001.pic
zerobased.002.pic
...
zerobased.097.pic
zerobased.098.pic
zerobased.099.pic

Example 2

In this example we want to do exactly the same thing as in example 1, but surplus we want to reverse the sequence:

"myseq.1.pic" shall become "zerobased.099.pic"
"myseq.2.pic" shall become "zerobased.098.pic"
...
"myseq.99.pic" shall become "zerobased.001.pic"
"myseq.100.pic" shall become "zerobased.000.pic"

We would enter the following line in a DOS shell:

The values 100, 1 and -1 are used for the first, last and step values of the input sequence instead of the values 1, 100 and 1. So instead of processing the input sequence 1, 2, 3, .., 99, 100 we do 100, 99, 98, .., 2, 1.

Example 3

In this last example we want to rename one of those creepy interlaced sequences. Let's assume we have a sequence that looks like this:

interlaced.1.1.pic
interlaced.1.2.pic
interlaced.2.1.pic
interlaced.2.2.pic
...
...
interlaced.49.1.pic
interlaced.49.2.pic
interlaced.50.1.pic
interlaced.50.2.pic

We would like to have a "normal" sequence going from 1 to 100 without those even/odd frames. To do so, we need to reindex the even frames (those that end with ".1.pic") and then the odd frames (those that end with ".2.pic").

First we take care of the even frames by entering the following line in a DOS shell:

Note that the step value of the output sequence is equal 2:

"interlaced.1.1.pic" will be renamed as "progressive.1.pic"
"interlaced.2.1.pic" will be renamed as "progressive.3.pic"
"interlaced.3.1.pic" will be renamed as "progressive.5.pic"
... and so on.

Now we rename the odd frames by entering the following line:

It is almost the same as the first, but this time we process the ".2.pic" files and our output sequence starts at 2:

"interlaced.1.2.pic" will be renamed as "progressive.2.pic"
"interlaced.2.2.pic" will be renamed as "progressive.4.pic"
"interlaced.3.2.pic" will be renamed as "progressive.6.pic"
... and so on.

And the final result is our renamed sequence called "progressive" ranging from 1 to 100.