Re: runas could not execute the copy command

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Faisal (faisal_qasimpk_at_yahoo.com)
Date: 06/23/04


Date: 23 Jun 2004 00:18:52 -0700

Actually the error is it could not find copy command itself, as can be
seen as follows:

"
C:\>runas /user:clas@domain "dir"
Enter the password for clas@domain:
Attempting to start dir as user "clas@domain" ...
RUNAS ERROR: Unable to run - dir
2: The system cannot find the file specified.
"

There must be something fairly simple, which I am missing.
Regards
"Rick" <me@privacy.net> wrote in message news:<OLm8U1GWEHA.3524@TK2MSFTNGP12.phx.gbl>...
> "Faisal" <faisal_qasimpk@yahoo.com> wrote in message news:d55ce0a6.0406220718.48340f13@posting.google.com...
> > Hi,
> >
> > Trying to create a script to copy files using runas, but it is failing with:
> >
> > "
> > C:\>runas /user:clas@domain "copy payment_initation"
> > Enter the password for clas@domain:
> > Attempting to start copy payment_initiation as user "clas@domain" ...
> > RUNAS ERROR: Unable to run - copy payment_initiation
> > 2: The system cannot find the file specified.
> > "
> >
> > How can this be resolved. I will be grateful for your help.
>
> Is the file in the current folder? If not, you'll need to qualify the
> copy command, i.e. "copy <drive>:\<folder>\payment_initiation".
>
> Rick



Relevant Pages

  • Re: Test for existence of a folder on a network drive?
    ... You can use the DIR command to query the folder: ... Rick wrote: ... "You cannot use the if command to test directly for a directory, but the null device does exist in every directory. ...
    (microsoft.public.windowsxp.general)
  • Advanced setting in File types
    ... I set up a command so when right clicking on tif file it ... will copy the file to a specific folder. ... Rick ...
    (microsoft.public.windowsxp.general)
  • RE: Locating corrupt driver
    ... This article describes the functionality and limitations of the Windows ... Create and format partitions on drives. ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.applications)
  • Re: Dim RetVal
    ... Looking in the folder there is a coed11.dat DAT file, the coed11 application, coed11.gdb GDB file ... The reason is that without the quotes, the command processor sees the ... In the command window, first type ... This *should* have exactly the same effect as the macro. ...
    (microsoft.public.word.vba.beginners)
  • Re: Batch Job
    ... You cannot use the 'del' command at a DOS prompt. ... files (since 'del' might not work into the special folder). ... while the above will delete the deleted files from the Recycle Bin but it also deletes configuration files used by the Recycle Bin. ...
    (microsoft.public.windowsxp.general)