We help IT Professionals succeed at work.
Get Started

Merge TIFF files with the same part of a filename

2,511 Views
Last Modified: 2016-12-08
I am using Windows.
I have an identical problem to the one found here:
https://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26864426.html

The problem is that I have no programming experience at all.

Therefore, I am not looking for code but rather I am looking for a program that will accomplish this.


eg:
I have a directory with thousands of TIFF files. An example of the files are:

1979_00032983_0001.tif
1979_00032983_0002.tif
1979_00032984_0001.tif
1979_00032984_0002.tif
1979_00032984_0003.tif
1979_00032985_0001.tif
1979_00032986_0001.tif
1979_00032986_0002.tif
and so on...

As you can see, the first 13 digits of some of the filenames are exactly the same. These actually belong together as one file. I need a script that joins 2 (or more) TIFF files together which have the same first 13 digits AND removing the second underscore and everything after it. So based on the above example, the final output should look like this:

1979_00032983.tif
1979_00032984.tif
1979_00032985.tif
1979_00032986.tif
and so on...

Thanks in advance.

-kitmaddox@yahoo.com
Comment
Watch Question
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 87 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE