As a long-time user of the CHOICE command I was impressed to find the XCOPY alternative on your forum:
Code: Select all
for /F "delims=" %%L in ('xcopy /L /w "%~f0" "%~f0" 2^>NUL') do (
if not defined key set "key=%%L"
)
(It works nicely in Vista 32-bit BTW)
When I tried to test it at work today (from memory) I forgot to include the "if not defined" part and just tried to use the SET "KEY=%%L".
It failed horribly.
Can you explain what role the "if not defined" is playing here?
I have several other questions and points but will scour the existing posts before asking!
Thanks
gruff999