View Single Post
  #1 (permalink)  
Old 08-15-2007, 12:12 PM
nanay2007 nanay2007 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 2
Default using 'rename file' option for Task Actions

Hi,

I am creating a task action which should generally follow the procedure shown below.

1- Open Program
2- open Program file.
3- Update Edit input values of program parameters through dialog windows.
4- Run the program to get results. This program is a model simulator, so it runs a model and generates output result. The program saves these output files with certain names. When I run the program again, it creates the similar output files with the same names, so it actually overrides the previous files that were generated. I do not want to lose the previous files, but save them with another name.
5- Save output files with names that take into account the number of times of simulation runs. THis step would allow me to keep every generated output files during the entire loop process for this task. I actulally used 'Loop for Times' option to the run as many simulations as the values of the loop variable.
6- Go back to step 3, and proceed until an specified number of loop iterations (simulation runs) has been reach. If this is reach, go to step 7
7- Close program

For step 5, I used the 'rename file' option to rename the generated output file using another name that indicate the actually number of simulation runs that has been performed already.

In the dialog window for the 'rename file' option, I typed the physical address for the file that I want to rename, which is like this:

F:\umsa\Well\output\nitro1.txt

The word 'Well' is the name of the program, and output is the folder in which the program saves the output files.

Then, I want to create a new file name for this file, and save it in a different folder. This is how I type the new address.

C:\Documents and Setting \Desktop\Wellfile\p$run_count$nitro.txt.

Notice that I save the file in a different folder called 'Wellfile'. For the new name of the file, I used list-type variable that gets read during each loop iteration. 'Run-count' consists of the number sequence from 1 to 567, in steps of 1. Therefore, by using this variable, I could rename the file according according to the number of iteration perfomred.

Please let me know if this method is correct. I am just not sure if I could enter the new file name by giving the address and using a program variable to name the name. If you need to more details or clarification. Please email me at emailparati@yahoo.com.

Thank you.

Last edited by nanay2007 : 08-15-2007 at 12:19 PM.
Reply With Quote