View Single Post
  #1 (permalink)  
Old July 5th, 2007, 02:45 AM
nayaz nayaz is offline
Registered User
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy command not working


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.
any one has the same issue. If any one has resolved it or has any suggessions please let me know.

Reply With Quote