Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Logon script

Status
Not open for further replies.

vb8304

IS-IT--Management
Mar 22, 2001
55
US
I realize this is really a basic question and this may not be the right forum but I am writing a simple script (DOS)that will check to see if a file is in a folder. If the file does not exist run the following command.

@echo off
SET PATH=Y:\;%PATH%;c:\windows\command
c:
cd "\program files\testprog\"
IF not exist test.exe goto END
call \\examsv1\groups\testgroups\setup.exe

:END
The IF line is not being used when I run the script. Primarily dealing with WIN98. I really need to learn VBS.
Any Ideas?
Thanks.
 
We had the same problem here. The IF statement does not appear to function well with the NOT statement. although, you could change it to an IF ELSE statement and try that.

Example:

If exists test.exe call \\examsv1\groups\testgroups\setup.exe

else
:END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top