There are VBScript calls to HTTP/XML librares by using
Set xml = CreateObject("Microsoft.XMLHTTP")
Are there any out there to use as a full FTP client?
thanks,
josé
The following script and embedded function will run from WSH to return and display the specified file; you can convert it to an ASP or IE hosted file by using response.write/document.write instead of wscript.echo.
sXMLData = GetXML("ftp://ftp.microsoft.com/bussys/readme.txt","","")
wscript.echo sXMLData
Function GetXML(sURL,sUsr,sPasswd)
' Create an xmlhttp object:
Dim oXML
Set oXML = CreateObject("Microsoft.XMLHTTP")
' Opens the connection to the remote server.
' rtn = xml.Open((B))
oXML.open "GET",sURL, false,sUsr,sPasswd
' Actually Sends the request and returns the data:
oXML.send
Do:wscript.sleep 10:Loop While oXml.ReadyState<>4
GetXML = oXML.responseText
End Function
"jic" <cab...@wrc.xerox.com> wrote in message news:a8o8v2$pvj$1...@news.wrc.xerox.com...
To do a quick browse and see what people have done, go to
http://groups.google.com
and plug in this search:
ftp group:microsoft.public.scripting.*
You will get a LOT of hits.
In case this is the approach you want to take but it is less than obvious how to do some particular things, go ahead and take an initial look for something that *looks* like what you want to do and then do a followup to the "mainline" scripting groups - everyone seems to gravitate to microsoft.public.scripting.vbscript these days... :-)
----- Original Message -----
From: "jic" <cab...@wrc.xerox.com>
Newsgroups: microsoft.public.inetsdk.programming.scripting.vbscript
To: <alexange...@hotmail.com>
Sent: Monday, 2002-04-08 16:18
Subject: Re: ftp library
>
> Thanks Alex. The idea is to fully have the ftp libraries so
> that I can do ftp commands while logged on an ftp server.
> For example: here are the steps that I would like to do:
>
> ftp host.company.com
> name user
> pass password
> dir [do something with the output of dir]
> mput file1 fil2 file3 file4 fileN
> quit
>
> plus others, but this basic example, will help me greatly.
>
> thanks,
>
> josé
>
>
> In article <#ZHFbJr3BHA.2488@tkmsftngp04>,
> alexangelopoulos_at_hotmail_dot_com_remove__ says...
> >
> >You can use XMLHTTP to do that in most cases. Here's an
> example of =
> >getting a text file via FTP with XMLHTTP; it gets a little
> more hairy =
> >with special types of files, so you might want to mention
> what you are =
> >after.
> >
> >The following script and embedded function will run from WSH
> to return =
> >and display the specified file; you can convert it to an ASP
> or IE =
> >hosted file by using response.write/document.write instead
> of =
> >wscript.echo.
> >
> >
> >sXMLData =3D
> GetXML("ftp://ftp.microsoft.com/bussys/readme.txt","","")
> >wscript.echo sXMLData
> >
> >Function GetXML(sURL,sUsr,sPasswd)
> > ' Create an xmlhttp object:
> > Dim oXML
> > Set oXML =3D CreateObject("Microsoft.XMLHTTP")
> > ' Opens the connection to the remote server.
> > ' rtn =3D xml.Open((B))
> > oXML.open "GET",sURL, false,sUsr,sPasswd
> > ' Actually Sends the request and returns the data:
> > oXML.send
> > Do:wscript.sleep 10:Loop While oXml.ReadyState<>4
> > GetXML =3D oXML.responseText
> >End Function
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >=20
> >"jic" <cab...@wrc.xerox.com> wrote in message =
> >news:a8o8v2$pvj$1...@news.wrc.xerox.com...
> >>=20
> >> Hi all!
> >>=20
> >> There are VBScript calls to HTTP/XML librares by using
> >>=20
> >> Set xml =3D CreateObject("Microsoft.XMLHTTP")
> >>=20
> >> Are there any out there to use as a full FTP client?
> >>=20
> >> thanks,
> >>=20
> >> jos=E9
> >>=20
> >>=20
> >
>
>
ftp host.company.com
name user
pass password
dir [do something with the output of dir]
mput file1 fil2 file3 file4 fileN
quit
plus others, but this basic example, will help me greatly.
thanks,
josé
In article <#ZHFbJr3BHA.2488@tkmsftngp04>,
alexangelopoulos_at_hotmail_dot_com_remove__ says...
>
>You can use XMLHTTP to do that in most cases. Here's an
example of =
>getting a text file via FTP with XMLHTTP; it gets a little
more hairy =
>with special types of files, so you might want to mention
what you are =
>after.
>
>The following script and embedded function will run from WSH
to return =
>and display the specified file; you can convert it to an ASP
or IE =
>hosted file by using response.write/document.write instead
of =
>wscript.echo.
>
>
>sXMLData =3D
GetXML("ftp://ftp.microsoft.com/bussys/readme.txt","","")
>wscript.echo sXMLData
>
>Function GetXML(sURL,sUsr,sPasswd)
> ' Create an xmlhttp object:
> Dim oXML
> Set oXML =3D CreateObject("Microsoft.XMLHTTP")
> ' Opens the connection to the remote server.
> ' rtn =3D xml.Open((B))
> oXML.open "GET",sURL, false,sUsr,sPasswd
> ' Actually Sends the request and returns the data:
> oXML.send
> Do:wscript.sleep 10:Loop While oXml.ReadyState<>4
> GetXML =3D oXML.responseText
>End Function
>
>
>
>
>
>
>
>
>
>=20
>"jic" <cab...@wrc.xerox.com> wrote in message =
>news:a8o8v2$pvj$1...@news.wrc.xerox.com...
>>=20
>> Hi all!
>>=20
>> There are VBScript calls to HTTP/XML librares by using
>>=20
>> Set xml =3D CreateObject("Microsoft.XMLHTTP")
>>=20
>> Are there any out there to use as a full FTP client?