Copy command not working from script
- From: Nayaz <syed.ikram@xxxxxxxxx>
- Date: Thu, 05 Jul 2007 01:11:52 -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: Todd Vargo
- Re: Copy command not working from script
- From: mpiceni
- Re: Copy command not working from script
- Prev by Date: Re: Renaming files and change to UPPERCASE
- Next by Date: Re: Copy command not working from script
- Previous by thread: Happy Fourth of July : Batteries not included
- Next by thread: Re: Copy command not working from script
- Index(es):
Relevant Pages
|