| T O P I C R E V I E W |
| rmtruji |
Posted - 04/21/2004 : 5:25:01 PM I have a script that currently prompts the user to select a file using fdlog.MultiOpen(). Once the OK button is selected in the "Open" window, I want the script to automatically select a 2nd file from the same directory that has the same name as the original file plus underscore DR (filename_DR). Does anyone know how I can do this? |
| 2 L A T E S T R E P L I E S (Newest First) |
| sammi.song |
Posted - 04/22/2004 : 10:37:55 PM Hi rmtruji,
Maybe your selected files all have the 2nd files with a suffix "_DR". I hope the following scripts would be useful:
fdlog.MultiOpen(); loop (ii,1,FDlog.MultiOpen.Count) { win -t data; //open a new worksheet Fdlog.Get(A, ii); //get the selected filename respectively open -w %A; //import the current selected file into wks %w=%H; //backup this wks name win -t data; //open a new worksheet win -a %H; //active this new wks open -w %w_DR.dat; //import the data file named %A_DR.dat };
Thanks, Sammi |
| jlang |
Posted - 04/22/2004 : 3:49:10 PM This might not work but you may try:
open -w %A_DR; // import the data named %A_DR
This is under the assumption that your first filename is passed to %A.
HTH |