|
[Sponsors] |
Run a macro on multiple files in a loop, and saving them with a new name |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 2, 2020, 23:36 |
Run a macro on multiple files in a loop, and saving them with a new name
|
#1 |
New Member
Carlota
Join Date: Feb 2019
Posts: 1
Rep Power: 0 |
Hi,
I am trying to write a Macro and script, which ideally, would do: - Open file "filename_X" (where X is a number) - Edit it (this part is done; I am calculating new variables) - Write the data into a file named "filename_X_Edit.dat" for multiple files. I would like to be able to run the script on multiple files, all named "filename_1", "filename_2", "filename_3"... and get the new files "filename_1_Edit.dat", "filename_2_Edit.dat", "filename_3_Edit.dat"... after running my macro on them. Should the opening/closing of the files be included in the macro, or should that be in the wrapper shell script used to run it on all the files? I am new to both macros and Python, so I am a little confused as to what to do. I am thinking the best way to do this is to have a script that gets the filename, opens it, and runs the Tecplot macro on it, and then saves the new data into a new file. However, I don't know how to do this. I am looking at this wrong? Is there a better way to do this? Thank you! |
|
Tags |
macro, tecplot |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF: saving multiple files | Persil | Fluent UDF and Scheme Programming | 1 | March 3, 2014 10:17 |
Movie Macro in Tecplot | TedBrogan | Tecplot | 2 | February 4, 2011 10:59 |