OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

web2file

Contents

Brief Information

Copy a web page to a local file

Command Line Usage

web2file url:="www.originlab.com" fname:="c:\test.txt"

web2file url:="www.originlab.com" fname:="c:\test.html" response:=2 maxtime:=20

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
URL url

Input

string

url$
Specify address of the web page to be copied.
File Name fname

Input

string

fname$
Specify the name of the downloading file. Usually, you need to specify the address in which to store the file. For example, you could use C:\test.txt to specify the name and the address together. If not specify the address of the file, the file will be put on the installation folder of Origin by default.
Maximum Transfer Time (sec, 0 = no limit) maxtime

Input

int

0
Specify the maximum transfer time. Please note that the time includes the time to wait the server to find/ generate the file and the time to transfer the file. The default setting is 0, which means the time is unlimited.
Response Timeout (sec) response

Input

int

30
In some situation, the server may need time to find/ generate file when the URL is requested. This parameter allows you to set the response timeout to wait the server to find/ generate the file.

Description

This X-function is used to copy a web page to a local file.

Related X-Functions