Batch File

D

Darren

Hi,

I am trying to create a batch file that copies a file to
the c:\documents and settings\all users\start
menu\prgrams\startup directory on users machines. The
batch file is executed from a novell login script. When I
execute the script I get an error message that
reads 'and' is not a recognised function.....
Is there any other way I can access this directory

REM @echo off

if exist c:\Documents and Settings\All Users\Start
Menu\Programs\Startup\poaginst.exe goto DELMENUXP
if not exist c:\Documents and Settings\All Users\Start
Menu\Programs\Startup\poaginst.exe goto COPYXP


:DELMENUXP
del c:\Documents and Settings\All Users\Start
Menu\Programs\Startup\poaginst.exe


:COPYXP
copy u:\Antivirus\epo\poaginst.exe c:\windows\temp
move c:\windows\temp\poaginst.exe c:\Documents and
Settings\All Users\Start Menu\Programs\Startup\
 
D

David Candy

You need to use either short file names (use Dir /x to see them) or enclose names with spaces in quotes.

if exist "c:\Documents and Settings\All Users\Start Menu\Programs\Startup\poaginst.exe" goto DELMENUXP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top