I think this is a simple batch programming question, but after much searching, I can't find the answer.

I'm trying to figure out how to refer to files whose names contain difficult characters.

It seems that double quotes have the effect of treating most enclosed characters literally. For example, for a file named ^^.txt, dir "^^.txt" will find the file, while dir ^^.txt won't.

However, I don't know how to escape %. For example, for a file named %ERRORLEVEL%.txt, none of these find the file:

dir "%ERRORLEVEL%.txt"  

dir "%%ERRORLEVEL%%.txt"  

dir "^%ERRORLEVEL^%.txt"

Any suggestions would be appreciated.