Pegasus,
I had major problems testing the code you posted - it was
some time before I worked out that the cause was not your script but the
character set.
On 'copying and pasting' your posted script, the "bar" redirectional
character did not come out as 0x7C but came out as 0xDD instead thus
wrecking the functionality of the batch file.
Just thought you might like to know as it might be a bit of a hazard if
it were code given to help someone who was not so well acquainted with
batch programming as Mr dash...
==
Cheers, Tim Meddick, Peckham, London. :-)
"Pegasus [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Looks good. You could simplify it further, if only because the logic
> is a lot easier to understand than the double negative you're forced
> to use in your implementation:
>
> echo on
> ver | find "5.1" || goto :eof
> call \\Server\share\batchfile1.cmd
>
>
> <-> wrote in message news:(E-Mail Removed)...
>> This is what I used:
>>
>> echo on
>> ver | find "5.1"
>> if not errorlevel 1 (
>> CALL \\server1\share\batchfile1.cmd
>> ) else (
>> goto :eof
>> )
>>
>>
>> @Shenan - This was not a Google situation. I initially was trying to
>> find a file that existed only on XP and after Googling extensively
>> could not find a lock. I posted here, and an alternate suggestion
>> was offered. I know how to search Google, that's how I found the
>> syntax for this code to select "5.1" But thanks for bringing it up.
>>
>>
>>
>> "Pegasus [MVP]" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> I'm actually glad you noticed my mistake. This is one of the
>>> advantages of newsgroup: Peer review. It increases the confidence
>>> level for posters who may otherwise attempt to implement a useless
>>> or damaging solution to their problem.
>>>
>>> "Tim Meddick" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> Thanks - I wasn't trying to be "clever" or point out mistakes - I
>>>> genuinely did not know if I was missing something.
>>>>
>>>> Thankyou again for clarification.
>>>>
>>>> ==
>>>>
>>>> Cheers, Tim Meddick, Peckham, London. :-)
>>>
>>>
>>
>>
>
>
|