On Wed, 16 Jun 2004 12:54:34 -0400, "Michael Herz" <(E-Mail Removed)> wrote:
>Hi all,
>
>If I'm running a "FOR /R" loop that encounters a directory with an
>exclamation in it's name and DELAYEDEXPANSION is on, it fails because the
>exclamation is left out of the command that FOR builds. The following code
>will demonstrate this if you run it on a dir that has a subdir with an ! in
>it's name:
>
>setlocal enabledelayedexpansion
>for /r "%~1" %%a in (.) do (
> dir "%%a">nul
> )
>endlocal
>
>You will see a "The system cannot find the file specified." pop up.
>
>Any thoughts would be appreciated.
>
If the folder was C:\\Exc!mark
use C:\\Exc^^!mark
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com