Download File

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
(10 intermediate revisions by one user not shown)
Line 7: Line 7:
 
'''Save As:''' Determines where the downloaded file will be downloaded to in your system folders.
 
'''Save As:''' Determines where the downloaded file will be downloaded to in your system folders.
  
The browse button on the command is used to browse for the area you would like to download the file to and name your file.  
+
The file is given a name and a location is selected through the save as dialog that appears after clicking the browse button.
  
== Example ==
+
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/text%20files.txt", "C:\\Users\\UBook\\Documents\\bluedays.txt")
+
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.  
The browse button on the command is used to browse for the area you would like to download the file to and name your file.
 
  
[[File:downloadfile.png]]
+
 
 +
[[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.


Yeats.png

[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")

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox