M
Michael.Knight
Hello world, especially Microsoft experts ...
I'm trying for at least two weeks long to find a cure for the AMAZING
((( delayed variable expansion feature. Almost all things do work in my
batch script, except one thing - EXCLAMATION MARK.
I have found one man's notes for bacth files and now I can echo
exclamation mark when delayed variable expansion is ON. But I cannot echo
the exclamation mark that is part of a variable:
*************************************************
setlocal enabledelayedexpansion
ECHO D:\^^!Backup
- this will show D:\!Backup on the screen => OK
*************************************************
setlocal enabledelayedexpansion
SET BackupDirRoot=D:\^^!Backup
ECHO %BackupDirRoot%
- this will show D:\Backup on the screen => BAD BAD BAD
*************************************************
The thing is that in the script I have to almost everytime disable and
enable delayedvariableexpansion feature, not talking about the thing to be
carefull where to use %variable% and where to use !variable!
(((((((((((((((
If someone knows how to get out of this MS mess, I would be very gratefull
to him, but otherwise, people, you must understand that after almost a
month of searching on the net how to solve this and being nearly at the
same point, I cannot say that this feature is GOOD or better said: WELL
DONE !!!
(
"Michael Knight"
I'm trying for at least two weeks long to find a cure for the AMAZING

batch script, except one thing - EXCLAMATION MARK.
I have found one man's notes for bacth files and now I can echo
exclamation mark when delayed variable expansion is ON. But I cannot echo
the exclamation mark that is part of a variable:
*************************************************
setlocal enabledelayedexpansion
ECHO D:\^^!Backup
- this will show D:\!Backup on the screen => OK
*************************************************
setlocal enabledelayedexpansion
SET BackupDirRoot=D:\^^!Backup
ECHO %BackupDirRoot%
- this will show D:\Backup on the screen => BAD BAD BAD
*************************************************
The thing is that in the script I have to almost everytime disable and
enable delayedvariableexpansion feature, not talking about the thing to be
carefull where to use %variable% and where to use !variable!

If someone knows how to get out of this MS mess, I would be very gratefull
to him, but otherwise, people, you must understand that after almost a
month of searching on the net how to solve this and being nearly at the
same point, I cannot say that this feature is GOOD or better said: WELL
DONE !!!

"Michael Knight"