automate running of batch file

N

Newbie

Hi,

I have a batch file that simply
maps two network drives
deletes files from a local directory
copies files from the server
deletes the mapped drives.

Rather than having to go to each PC to run the file is it possible to set it
up so that it can run automatically when the user logs on?

If yes, how?

I would only want the script to run once . . . . is their a way of
monitoring which computers have been updated? writing to a log file perhaps?
 
L

Lanwench [MVP - Exchange]

Do you have a domain? If so, you can put this in your login script - and use
an if exist statement to make sure it doesn't keep doing the same thing over
and over if you don't want it to.
 
N

Newbie

Thanks but I am not sure how to put an If else statement in the script

I would like to check for a text file called updated0312.txt in the
C:\Program Files\dir1\dir

How would I do this?





"Lanwench [MVP - Exchange]"
 
L

Lanwench [MVP - Exchange]

regular drive mapping stuff or whatever you do goes here

if exist c:\progra~1\dir1\dir\updated0312.txt goto END

(ordinary file copy thing you want to do goes here)

:END
exit

Thanks but I am not sure how to put an If else statement in the
script

I would like to check for a text file called updated0312.txt in the
C:\Program Files\dir1\dir

How would I do this?





"Lanwench [MVP - Exchange]"
Do you have a domain? If so, you can put this in your login script -
and use an if exist statement to make sure it doesn't keep doing the
same thing over and over if you don't want it to.
 

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