Copy command not working from script
- From: Nayaz <syed.ikram@xxxxxxxxx>
- Date: Thu, 05 Jul 2007 01:10:37 -0700
Hi,
I wrote a script to copy a file from one drive to another
Dim oShell, oExec, sSyntax, nreturn
Set oShell = CreateObject("Wscript.Shell")
sSyntax = "copy c:file1 d:file2"
nreturn = oShell.Run(sSyntax)
Wscript.Echo nreturn
I get a error "System cannot find the file specified"
but if I give the same command from command prompt it works fine.
i tried with "ofs.copyfile" its working fine but i need to use "copy"
command try
any one has the same issue. If any one has resolved it or has any
suggessions please let me know.
.
- Follow-Ups:
- Re: Copy command not working from script
- From: mpiceni
- Re: Copy command not working from script
- Prev by Date: Re: Run multiple scripts at same time
- Next by Date: Re: Synchronous CopyFile
- Previous by thread: Re: Run multiple scripts at same time
- Next by thread: Re: Copy command not working from script
- Index(es):
Relevant Pages
|