|
Answer» Hi Guys, This is my FIRST post and first venture into DOS(!) I've been writing small reporting applications in MS Access and need a script to copy a file from one location to another. Is it possible to copy from an internal webserver using DOS commands? Thanks in advance SteveWelcome.
I can't THINK of an EASY to download a file over HTTP using only native commands, but you can download WGET.EXE (http://users.ugent.be/~bpuype/wget/) and it should do exactly what you want. To copy a file named "file.txt" on internal WEB server named "webserver" to your current directory, just do: Code: [Select]wget http://webserver/file.txtor to copy to a new location, use: Code: [Select]wget -O C:\New\Path\file.txt http://webserver/file.txtyou can use this VBSCRIPT if you can't use other tools Code: [Select]URL = "http://www.google.com" set WshShell = WScript.CreateObject("WScript.Shell") Set http = CreateObject("Microsoft.XmlHttp") http.open "GET", URL, FALSE http.send "" WScript.Echo http.responseText set WshShell = nothing set http = nothing usage: Code: [Select]c:\> cscript /nologo myscript.vbs > outfile
|