Word with star character are ignored in FOR loop
Posted: 11 Jul 2011 13:24
Hello,
This FOR loop ignores (jump over) strings including star character: *
The output I got with this script is only the 3rd string: file3.txt
I would like to get this:
How tho solve my problem?
Thanks and regards.
CONFIG:
MS Windows 7 SP1, Firefox 5. Microsoft Windows [Version 6.1.7601]
This FOR loop ignores (jump over) strings including star character: *
SET d=aaa* file*.* file3.txt
FOR %%f in (%d%) DO (ECHO.%%~f)
FOR %%f in ("%d: =" "%") DO (ECHO.%%~f)
The output I got with this script is only the 3rd string: file3.txt
I would like to get this:
aaa*
file*.*
file3.txt
How tho solve my problem?
Thanks and regards.
CONFIG:
MS Windows 7 SP1, Firefox 5. Microsoft Windows [Version 6.1.7601]