Save to File

From UBot Studio
Jump to: navigation, search

This command is a File Command. This command allows you to save text and lists to a file. You can specify the name and location where you want to save the file.

If you are saving text, it will save it verbatim to the file, and if you are saving a list it will save it to the file one list item per line.

You can read these files using the $read file or $list from file functions.

You can save files with whatever extension you choose (i.e. .txt, .csv, .html, .bat, etc)


Save As: the file path complete with file name and file extension

Content to Save field: where you would place content of the file

Example

navigate("http://wiki.ubotstudio.com/wiki/Main_Page", "Wait")
wait(5)
save to file("C:\\Users\\Desktop\\New Text Document.txt", $scrape attribute(<href=w"/wiki/*">, "innertext"))



Running the script will navigate to the specified website, scrape the specified items, and save the scraped items to the file specified in the save to file command.


Savetofile03.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox