On 01/06/2018 09:45 PM, Climate Hillbilly Davis wrote:
> It's not a deal at all. The batch file is small to begin with.
*nod* That's what I figured. But based on your previous comment,
"…took about 500 more characters…" I thought you might be trying to be
as small as possible.
> I've got @echo off, spaces and cls's and moves and program starts,
> and it's only 494 bytes.
Based on my tests (that I've since removed) I think I was coming in at
~127 B compared to 158 B. So, a non-trivial percentage, …if you are
chasing every byte possible. ;-)
> That worked fine too. Thanks.
You're welcome.
> No space in the extension, so all is well.
*nod*
> I'm not sending a parameter, so I just changed the %1 to the name of
> the file that I produce later in the batch file.
You might be able to refactor things to remove the conditional and just
call the for loop directly.
> One question, though... what is the %~1? I also put the name of the file
> there and it still works. What is the difference in %1 and %~1?
Based on a quick skim of the output of "for /?", it looks like the tilde
without any letter between it and the variable name removes surrounding
quotes.
So I think the idea is to remove the quotes if they exist, and to
manually put them there. Thus avoiding a double quoting issue.
> Thanks again.
You're welcome.