RemoveEnding Question

Hi,

I am doing a batch file import and need to clean up and relabel the waves.

The data files are labelled such as SLOT2-6” wafer.TXT and I want to keep only the SLOT2. The are many items so I cannot just select the first five characters.

I am attempting to use the RemoveEnding Command

NewName = removeending(S_Filename,"-6\” wafer.TXT") with the understanding that \" is the escape sequence for the " in the name.

This is not working and returns the original string.

What am I doing wrong?

More testing:

I used
NewName = removeending(S_Filename,"-6” wafer.TXT")
and that worked but why? How does Igor know the string ends at the 3rd quotation mark and not the second?
Not all quotes are created equal; the one Igor uses to quote strings is a "straight" quote. The one that's in your file isn't really a quote character, it is a seconds character, often called a "smart quote". You can see that your file name's quote is slightly italicized.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.