Load waves from multiple files and rename
| temasi | April 24, 2012 - 19:27 | ||
|---|---|---|---|
|
Hi all, I have to load several waves from different files, and I want to keep the original name of the wave and add the file name to the name of the wave. That way Igor won't show any error for loading waves with the same name. For example, I have 4 txt files: I need to load the waves and rename them: Element1_File1 Element1_File2 Element1_File3 Element1_File4 So far I've managed to load the waves from multiple files and rename them after the file name using the functions below: I am new new to programming and I've been creating some useful "Frankenstein" procedures by using extracts from old posts. I guess I'll hang to it until I understand how everything really works. Thanks. |
|||

Joined: 2007-06-21
Location: United States
First, you may be better off loading the columns from a given file into a data folder named after that file. To learn about data folders, execute:
Assuming you want to go with your original plan . . .
To control the names of the waves being loaded by LoadWave you need to use the /B flag.
There is an example of this at http://www.igorexchange.com/node/2819. See the second post.
In your case it will look something like this:
Joined: 2012-04-24
Location: Australia
Hi,
Thanks for the answer. I haven't figured out yet how to make it work for multiple files. I forgot to mention that I have more than 100 files and each have more than 50 waves, and their names are totally different... not as in my previous example.
I'm using: