A very last question before the next one
I'm trying to undestand how we should manipulate filename given in parameters by third part application.
My batchs still have issues with some specials chars.
1. First, I think every time we have to assign a var to a filename, we should have Delayed Expansion disabled, like this:
Code: Select all
setlocal DisableDelayedExpansion
set "_file1=%~1"
set _file1& rem "%_file1%" will work with any characters, in any command line
setlocal EnableDelayedExpansion
set _file1& rem "!_file1!" will also work with any characters, in any command line
Am I right or wrong???
2. The % issue
As an example, let's take a file named a%b.bat:
Code: Select all
set "_file=%~nx0"
set _file
>"new_file.bat" echo call "%_file%"
but how??? I didn't found the solution
Thanks for help