|
|
|
|
How to rename multiple image files (jobname000.tif, jobname001.tif, etc.)
|
| |
This batch script renames the files specified as an argument. It is called "myren1.bat" and can be used in DOS as follows:
myren1 file 2
which will do the following commands:
mv file001.tif file001_2.tif
mv file002.tif file002_2.tif
...etc...
The first argument to "myren1" is the jobname and the second is your "load case" number.
Put this "myren1.bat" DOS batch script in C:\winnt\system32 and you will have access to it all the time. Then, in ANSYS, you can use:
/SYP,myren1,file,2
and this will do the same commands as note above.
You can easily make a similar csh/ksh/sh script for UNIX, if you need this for UNIX as well. In C-shell, it is the "foreach" command.
@echo off
rem
rem Uses two arguments
rem First argument -- jobname
rem Second argument -- suffix for load case
rem
rem Quick fix by Sheldon at CSI
rem
DIR /B * | FIND "%1" | FIND "tif" | FIND /V "_" > temp.tmp
FOR /F %%i IN (temp.tmp) DO REN %%i %%~ni_%2.tif
|
| |
| |
|
|