foxidrive wrote:You need to use delayed expansion and then !fname! instead of %fname%
Be aware that it has some limitations: such as ! characters break it.
Or you could set fname=%1 before the loop begins.
That worked! I had never heard of delayed expansion.

Thanks very much for the help.
Wayne