There's a subtle difference between the EViews name of a workfile and the filename of the workfile. Windows filenames allow you to have dashes, such as:
But if you open this workfile in EViews, the name of the workfile will be:
EViews names do not allow dashes due to ambiguity between dashes and minus as in the following statement:
(if we allowed dashes in EViews names, we wouldn't know how to read this line "y minus z::x" or "y-z workfile, series x"?)
In any case, if you specify an EViews name, you shouldn't use dashes. Our COPY method does have some inconsistencies in how it parses the dash, but the overall premise is still correct. If you want to specify the file, use the file extension. If you want to specify the EViews name (and the associated workfile or database is not already open), make sure the internal name matches the filename exactly (no dashes allowed).
The one exception to this rule seems to be database (EDB) names so I'll look into that more. Those seem to allow dashes in the name in the COPY method without any issues. It's possible we could do that same exception for workfiles, but I'm not sure.
In any case, the safest thing to do when writing EViews programs is to avoid using dashes in any of your filenames.
Steve