Don't know if this is the right place to pose this question, but i am desperate i hope someone can give me a solution.
I have some documents that are scanned into tiff files. The files are in single page tiff format, so each file is only has one page of the document. Now I am trying to combine the single-page tiff files into a multi-page tiff file
Now all the files are in the “E:\scanned” folder
In the E:\scanned folder, there are hundreds of subfolders. The names of the subfolders are the serial number of the documents.
For example:
E:\scanned\00102681
E:\scanned\00101257
E:\scanned\01015781
And each subfolder has several of single-page tiff file.
For example:
E:\scanned\00102681\00102681-0001.tif
E:\scanned\00102681\00102681-0002.tif
E:\scanned\00102681\00102681-0003.tif
E:\scanned\00101257\00102681-0001.tif
E:\scanned\00101257\00102681-0002.tif
E:\scanned\00101257\00102681-0003.tif
E:\scanned\00101257\00102681-0004.tif
E:\scanned\01015781\01015781-0001.tif
E:\scanned\01015781\01015781-0002.tif
I found a program online called the IrfanView, which can combine single-page tiff files into a multi-page tiff. Someone even wrote a .bat command for combining all the single page within a folder and produce a multi-page tiff file called final.tif saved in the same folder.
Now, here is the question.
Since I don’t want to run that program hundreds of times, can someone help me modify the codes, so that if I put the .bat file in the E:\scanned folder, the .bat file would go to each subfolder, run the program, and the combined files have the same name as the folder names. Such as
E:\scanned\00102681\00102681.tif
E:\scanned\00101257\00101257.tif
E:\scanned\01015781\01015781.tif
It would be even better if all the combined files are saved in one folder. For example
E:\scanned\combined\00102681.tif
E:\scanned\combined\00101257.tif
E:\scanned\combined\01015781.tif
Bookmarks