Re: Running XCopy using AT command

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Todd J Heron (todd_heron_no_spam_at_hotmail.com)
Date: 10/21/04


Date: Thu, 21 Oct 2004 12:42:00 -0400

1) With the AT command the system account has local access rights but none
on network.
2) Since jobs run in their own environment, you can't make any assumptions
about environment variables, including path, which is why every file system
object should be fully referenced. Ex: use 'C:\winnt\system32\xcopy.exe'
instead of just 'xcopy'.
3) Pick a time (hh:mm) in the not-too-distant future so you don't have to
wait too long. This command will open a 'DOS' console window running in the
context that all AT jobs run in. In that console window, check the
environment variables by typing 'set'. Are the environment
variables what your batch file is expecting? Especially check the value of
'PATH'. If everything looks OK, type the name of your batch file. Since
the console window can be scrolled backwards for 9999 lines, you should be
able to see all the error messages. Fix the errors and try again.
4) Elevate the context of the batch file to that of an administrator on the
target system by first mapping a drive to the target system at the beginning
of the batch file with the Net Use command along with the /user switch.

-- 
Todd J Heron, MCSE
Windows 2003/2000/NT
"Ian" <Ian@discussions.microsoft.com> wrote in message 
news:732EEC06-8FC9-4D06-81C7-BA1696DF0685@microsoft.com...
>I have created a cmd file that copies files from one server to another 
>using
> xcopy.
> Running the cmd manually and files get copied over.
> Schedule it using AT or WINAT and it does not copy the files over.
> No error messages are reported.
> I have tried using robocopy but the same thing happens.
> The log on robocopy reports the following error:
>
> "error 5 (0x00000005) getting file system type of destination access is
> denied"
>
> I have checked the permissions of the target directory, even went through 
> a
> mapped drive instead of using \\servername etc. I have even checked the
> permissions on cmd.exe and svchost.exe.
> The only difference between running the cmd file manualy and through the
> schedule is manually it used cmd.exe but the AT command uses svchost.exe.
>
> Any ideas please.
> Cheers
> 


Relevant Pages

  • Re: Environmental Variables
    ... >Addition to George post: ... can't access environment variables at all from a real DOS command line ... >>To access it without the %s put the command in a batch file ...
    (comp.os.msdos.programmer)
  • Re: Platform Builder for Microsoft Windows CE 5.0 (cepb)
    ... thinly wraps the command line build tools. ... There are several ways to open and configure a build window - you can open ... that sets up the necessary environment. ... You can now use the resulting batch file to properly configure your build ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Cant run csc.exe?
    ... You probably need to execute vsvars32.bat to setup the environment before you can us it. ... I added the path variable and in the command prompt where I am running my make file I am getting the error: ... 'csc' is not recognized as an internal or external command,operable program or batch file. ... attrib user.dll -r ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Batch File from Win98SE to XP
    ... Perhaps I should clarify...using a shortcut to the batch file, ... at the command prompt it does not give any error messages, ... > command prompt and manually type in the path and batch file name, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: How to view what hardware has been detected in FC6
    ... error messages. ... get the same message "no such command". ... How did you become root? ... environment, including the path; if you use "su" you keep your current ...
    (Fedora)