I want to run an exe file on all files in a folder with 4 different options of operation. So each file produces 4 different outputs and I want all 4 outputs to have different names.
Kindly be detailed in your response as I am not good at scripting.
Regards!
OKay, here is example code I want to automate:
exefile -p1 1 -p2 2 -i inputfile.etc -o inputfile_12.etc
exefile -p1 3 -p2 4 -i inputfile.etc -o inputfile_34.etc
exefile -p1 5 -p2 6 -i inputfile.etc -o inputfile_56.etc
exefile -p1 7 -p2 8 -i inputfile.etc -o inputfile_78.etc
The script should fetch all the file names from the folder, do these operation, and save the output with a modified name of the file.
Thanks!
Hi again, I need to improve it a bit. It should read all the files (two different extensions) in the folder and match the file names for similarity but of different extensions. Each file has a very similar file but with the other extension. So, two matched file names should be available in two variables that can passed on to the subsequent operation commands. Thanks!
1 Answer