Download File
(Created page with "This command will download a file from the url location you provide that has a file for downloading. Download File is a Browser Command. The browse butto...") |
|||
(11 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | This command will download a file from the url location you provide that has a file for | + | This command will download a file from the url location you provide that has a file for downloading. |
− | downloading | + | |
− | + | ||
− | == Example == | + | Download File is a [[Browser Commands|Browser Command]]. |
+ | |||
+ | '''Download URL:''' Where the url for the file being downloaded should go. | ||
+ | |||
+ | '''Save As:''' Determines where the downloaded file will be downloaded to in your system folders. | ||
+ | |||
+ | The file is given a name and a location is selected through the save as dialog that appears after clicking the browse button. | ||
+ | |||
+ | The command also accepts variables and functions such as [[$next list item]], [[$list item]], [[$random list item]], [[$previous list item]], and [[$table cell]] for the folder location and the download url. | ||
+ | |||
+ | |||
+ | == Example 1 == | ||
<pre> | <pre> | ||
− | download file("http://ubotstudio.com/files/ | + | download file("http://ubotstudio.com/files/W. B. Yeats Poem.txt", "C:\\Users\\UBook\\Documents\\W. B. Yeats Poem.txt") |
</pre> | </pre> | ||
+ | |||
Running the command will download the file at the url to the specified location in your folder. | Running the command will download the file at the url to the specified location in your folder. | ||
− | |||
− | [[File: | + | |
+ | [[File:Yeats.png]] | ||
+ | |||
+ | == Example 2: XML Files == | ||
+ | |||
+ | Sometimes, you might encounter an xml file on a webpage such as an rss feed that will be difficult to scrape. | ||
+ | |||
+ | Since it is a file, download file can help bypass the scraping method and grab everything you need to a file. | ||
+ | |||
+ | <pre> | ||
+ | navigate("http://www.npr.org/rss/rss.php?id=1057","Wait") | ||
+ | wait(3) | ||
+ | download file("http://www.npr.org/rss/rss.php?id=1057","C:\\Users\\Documents\\doc text.txt") | ||
+ | |||
+ | </pre> |
Latest revision as of 20:08, 7 November 2017
This command will download a file from the url location you provide that has a file for downloading.
Download File is a Browser Command.
Download URL: Where the url for the file being downloaded should go.
Save As: Determines where the downloaded file will be downloaded to in your system folders.
The file is given a name and a location is selected through the save as dialog that appears after clicking the browse button.
The command also accepts variables and functions such as $next list item, $list item, $random list item, $previous list item, and $table cell for the folder location and the download url.
[edit] Example 1
download file("http://ubotstudio.com/files/W. B. Yeats Poem.txt", "C:\\Users\\UBook\\Documents\\W. B. Yeats Poem.txt")
Running the command will download the file at the url to the specified location in your folder.
[edit] Example 2: XML Files
Sometimes, you might encounter an xml file on a webpage such as an rss feed that will be difficult to scrape.
Since it is a file, download file can help bypass the scraping method and grab everything you need to a file.
navigate("http://www.npr.org/rss/rss.php?id=1057","Wait") wait(3) download file("http://www.npr.org/rss/rss.php?id=1057","C:\\Users\\Documents\\doc text.txt")