Hi All,
I have a written a script which creates a folder on a remote file
server and copies the data from local machine to that server.However
i'm unable to laucnh the xcopy command from cmd.exe. It just flashes
on for a sec, but no data is copied to the remote server.Can somebody
tell me why its not working and how to make it work.

This is what i have written.....
Set WshShell = WScript.CreateObject("WScript.Shell")
Wshshell.Run "Cmd.exe /c xcopy c:\*.xls
\\fileserver\drive\backup\machine /s", 1, True

Thanks for any kind of help
-Gaurav

Re: problems in launching from cmd.exe by Dave

Dave
Fri Dec 05 13:29:39 CST 2003

Try
cmd /k
to hold the window open and you may be able to see the error message.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

"Gaurav" wrote:
> Hi All,
> I have a written a script which creates a folder on a remote file
> server and copies the data from local machine to that server.However
> i'm unable to laucnh the xcopy command from cmd.exe. It just flashes
> on for a sec, but no data is copied to the remote server.Can somebody
> tell me why its not working and how to make it work.
>
> This is what i have written.....
> Set WshShell = WScript.CreateObject("WScript.Shell")
> Wshshell.Run "Cmd.exe /c xcopy c:\*.xls
> \\fileserver\drive\backup\machine /s", 1, True
>
> Thanks for any kind of help
> -Gaurav



problems in launching from cmd.exe by Tom

Tom
Mon Dec 08 07:34:23 CST 2003

Beside the good advice Dave Patrick gave, I would comment
that the UNC path you have used will only be supported by
machines with Win 2000 and above. Win NT and Win 9x
vaiants can only support UNCs that contain a computer name
and a sharepoint descriptor. To get to specific folders
below the sharepoint in those OS's a drive mapping MUST be
used.

Tom Lavedas
===========

>-----Original Message-----
>Hi All,
>I have a written a script which creates a folder on a
remote file
>server and copies the data from local machine to that
server.However
>i'm unable to laucnh the xcopy command from cmd.exe. It
just flashes
>on for a sec, but no data is copied to the remote
server.Can somebody
>tell me why its not working and how to make it work.
>
>This is what i have written.....
> Set WshShell = WScript.CreateObject("WScript.Shell")
>Wshshell.Run "Cmd.exe /c xcopy c:\*.xls
>\\fileserver\drive\backup\machine /s", 1, True
>
>Thanks for any kind of help
>-Gaurav
>.
>