PC Review


Reply
Thread Tools Rate Thread

automate running of batch file

 
 
Newbie
Guest
Posts: n/a
 
      2nd Dec 2003
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?


 
Reply With Quote
 
 
 
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a
 
      2nd Dec 2003
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.

Newbie wrote:
> 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?



 
Reply With Quote
 
Newbie
Guest
Posts: n/a
 
      2nd Dec 2003
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]"
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
> Newbie wrote:
> > 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?

>
>



 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a
 
      2nd Dec 2003
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


Newbie wrote:
> 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]"
> <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> 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.
>>
>> Newbie wrote:
>>> 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?



 
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
How to automate running a macro on a batch of documents? =?Utf-8?B?YWRuYQ==?= Microsoft Word Document Management 2 6th Oct 2006 08:58 PM
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Microsoft Excel Misc 2 18th Aug 2006 03:54 PM
Batch file to automate backup. =?Utf-8?B?bG9uZ2JvYXJkZXI1NDM=?= Windows XP General 5 30th Nov 2005 09:46 AM
Automate Log output from Batch File =?Utf-8?B?Z2liYnlsaW5rcw==?= Windows XP General 2 19th Sep 2005 08:27 AM
Running a batch file from vba =?Utf-8?B?UGVyaWNv?= Microsoft Access Form Coding 1 27th Apr 2005 06:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.