PC Review


Reply
Thread Tools Rate Thread

A file that exists only on XP?

 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      22nd Jul 2009
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. :-)



 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      23rd Jul 2009
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. :-)

>
>



 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      23rd Jul 2009
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. :-)

>>
>>

>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      23rd Jul 2009
You're right that is easier. Of course, I just put it into production today
so at this point I won't even breathe on it.

Thanks again for your help!

"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. :-)
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Tim Meddick
Guest
Posts: n/a
 
      24th Jul 2009
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. :-)
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A file that exists only on XP? Windows XP General 14 24th Jul 2009 01:01 AM
Re: Ethernet Multiple Networks detected, Local access only, Only one exists Robert L. \(MS-MVP\) Windows Vista Networking 0 27th Jun 2008 01:53 AM
Update links only if file exists Greg H. Microsoft Excel Programming 1 15th May 2008 10:48 PM
seting asp:image visibility only if file exists mc Microsoft ASP .NET 4 23rd Aug 2006 09:21 AM
Detecting if data exists on "Insert Into" and changing the value in field if exists! Les Microsoft Access Form Coding 2 8th Apr 2004 11:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.