Open steve6375 opened 7 years ago
Maybe set an internal parameter so only spaces and tabs are recognised as parameter separators? Or a new grub4dos command, parsecmd=0 for default behaviour and parsecmd=1 for space\tab only?
/test.bat aaa “enabled=1” bbb
Thanks, but I am using ls | call :copyfiles
so there are no quotes around each 'value' because ls does not use quotes in the output.
ls | set aa= call :copyfiles "%aa%"
ls | set aa= call :copyfiles "%aa%"
That does not work as the list is "aaa bbb cccc=1 dddd" so the whole list is passed as one value. The subroutine uses %1 %2 etc. to get each pathname, so if I remove the " " then it still gets cccc and 1 as separate variables.
If a space is in the filename or path, then it is escaped in ls command output e.g. ccc\ ddd.iso So maybe one solution would be to also escape the = sign in the output of the ls command? e.g. doris\=1.iso
I am not sure if this would affect compatibility???
I came across this issue when I had a filename of /WinntSetup/enabled=1 present. I was using a batch file to enumerate all files in the folder using ls | call :copyfiles the file enabled=1 is treated as two parameters enabled and 1
Example:
test.bat
Then enter command:
/test.bat aaa enabled=1 bbb
output:
Is there any way to fix this?