G
Guest
This may not be the right group, please redirect me if necessary.
I am trying to create a very simple batch file that looks in the root of the
current directory to see if a file with the extension "*.inp" exists in each
of the folders. If a folder contains this file type, I would like to call
another program with that file as input (shown below as jumper.inp, as I know
the real file name). Below is what I have so far:
path=c:\windows\system32;C:\Program Files\Ansys Inc\v100\ANSYS\bin\intel
for /R %%X IN (*.inp) DO call ansys100 -b -p ane3 -i jumper.inp -o output.out
The above does find the file, but then when it executes the call command it
says it can't find the file. Do I need to change to that local directory to
excute the call, and if so what would be the syntax of doing that and
returning to the first directory to continue the loop? Is there another way
to accomplish what I am trying?
Thanks,
Jason
I am trying to create a very simple batch file that looks in the root of the
current directory to see if a file with the extension "*.inp" exists in each
of the folders. If a folder contains this file type, I would like to call
another program with that file as input (shown below as jumper.inp, as I know
the real file name). Below is what I have so far:
path=c:\windows\system32;C:\Program Files\Ansys Inc\v100\ANSYS\bin\intel
for /R %%X IN (*.inp) DO call ansys100 -b -p ane3 -i jumper.inp -o output.out
The above does find the file, but then when it executes the call command it
says it can't find the file. Do I need to change to that local directory to
excute the call, and if so what would be the syntax of doing that and
returning to the first directory to continue the loop? Is there another way
to accomplish what I am trying?
Thanks,
Jason