I am looking for some help writing a batch file to run on Windows Server 2008.
I have many pairs of files in a folder. Let's say these files names are:
(R1 and R2 denote the pairs)
I have a commend that I need to run on each pair of files in this folder. To complicate things, that command outputs new files that I would like to have placed in a folder with the base name of the original R1 file (for example, AAA). The command I want to run is:
FLASH --min-overlap=20 --output-directory=[outdir] --output-prefix=MERGED [R1-file] [R2-file]
[R1-file] = the R1 file in the pair (eg. AAA_R1_001.SIX)
[R2-file] = the R2 file in the pair (eg. AAA_R2_001.SIX)
[outdir] = the destination directory (eg. AAA)
How would I write a batch that that can run this command for each file pair, detecting the base filename and passing that on to the command as the [outdir] parameter? I assume this will be using a for loop, but I've never written one before.
EDIT: Also, the entire output of this batch file should be captured to a text file, as the command outputs parameters I need to know.