Re: Dos AT command

Tech-Archive recommends: Fix windows errors by optimizing your registry




"monorato" <monorato@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:142B73E9-91CC-4532-9D00-88CCB8E62347@xxxxxxxxxxxxxxxx
I have mapped a drive on my local computer to a file server. I created a
batch file to copy files from the server onto the local machine. If I type
in
the name of the batch file at a command prompt it executes correctly. I
now
want it to run at night. I have tried the AT command on both Windows 2000
and
XP with no success. Here is an example of what I have entered:
AT 1:30am /every:monday c:\mon.bat /s /e /h /y
When I come in the next morning, nothing has copied. Can someone please
help.


Give yourself some eyes so that you can see what's going
on. Instead of invoking c:\mon.bat, invoke this batch file:

Line1 @echo off
Line2 echo %date% %time% Start of task > c:\test.log
Line3 echo User=%UserName%, Path=%path% >> c:\test.log
Line4 xcopy.exe /s /e /h /y "c:\SourceFolder" "d:\DestFolder\"
1>>c:\test.log 2>c:\test.err
Line5 echo ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
Line6 echo %date% %time% End of task >> c:\test.log

Examine the two log files after the job has run!

Note that at.exe will run the batch file under the System
account. This account has no access rights to networked
resources. Use the Task Scheduler as suggested by other
respondents if copying to a networked drive.


.



Relevant Pages

  • Re: Admin problems not letting me play BIA, Halo, Far Cry?
    ... So I'll clutter the forums with this. ... I ran the batch file and sat back and waited ... I reinstalled the gameI am having permissions problems ... it's the default administrator/single user account. ...
    (microsoft.public.windowsxp.games)
  • Re: Fix for: Server Application Unavailable Error after Applying Security Update for IE
    ... I've run the batch file, and now the login is failing for aspnet. ... > Internet Explorer security patch and ASP.NET V1.0 running on Windows XP. ... > Deletes and recreates the ASPNET account with a known temporary password ... This creates a new random password for the account ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Run Batch Files with SQL Server Agent
    ... Make a little change to the batch file and add folloiwng ... Server Agent, click on Job System, you will see option to ... >account on the local server. ... >local administrators account and it still did not work. ...
    (microsoft.public.sqlserver.server)
  • Re: Fix for: Server Application Unavailable Error after Applying Security Update for IE
    ... >> Internet Explorer security patch and ASP.NET V1.0 running on Windows XP. ... >> you can execute the following batch file as a workaround for the issue. ... >> Stops the IIS and ASP.NET state services>> Deletes and recreates the ASPNET account with a known temporary password ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Question on Account Usage
    ... What account does SMS use when it runs a program, ... such as a batch file, that calls to another server to run a exe. ...
    (microsoft.public.sms.setup)