ScriptTap
File

Command video guide

File

File reads information into a script and saves results back to storage. This Overview explains every mode without selecting or modifying a real file. Choose a separate operation tab for its shortest useful setup and actual result.

Mode cycles through Read, Create and Append. Use In selects This Script Only or Script Thread for output variables. Read selects an existing file through Android’s file picker and does not change it. Text and JSON read the whole document into a String destination. Read JSON does not extract a property; use the JSON command for field-level work.

CSV means comma-separated values: a table of rows and columns. Read Cell saves one value to a String. Row and numeric Column positions start at one; the header row counts as a row. Column can instead use a Header name from the first row, matching capitalization after surrounding spaces are ignored. Read Row collects Count cells across from the source row and column. Read Column collects Count cells down from the source row. Both write consecutive String slots in the named one-letter Array, beginning at the one-based destination Start. Keep the complete output range within supported capacity. A requested range extending beyond available data is filled with empty Strings. Numeric positions and counts can use earlier Integer variables where supported.

Create selects a writable Folder rather than an existing file. Name Source accepts a literal filename or a String variable; include the appropriate extension. Text and JSON content can be entered or supplied by a String variable. Supply a complete, correctly formed JSON document; File saves it rather than constructing its fields. Create CSV accepts CSV text or builds one quoted CSV row from an existing String array using Array, Start and Count.

If Exists controls filename conflicts. New Name preserves the existing file and adds either a date/time Timestamp or the lowest unused positive Number suffix. Overwrite replaces the existing contents and should be selected only deliberately. Nothing is overwritten during this overview.

Append selects an existing writable file and supports Text and CSV, not JSON. Text Source accepts literal Text or a String variable. Append as new line adds a trailing line break; it does not force a line break before the appended text. CSV Append accepts one valid row from entered Text or a String variable, quotes fields as needed and ends that row with a line break. Its Create New Row switch adds a missing leading boundary when the existing file ends in an unfinished row. With the switch off, writing begins directly at the existing end.

Save Outputs enables optional Success Boolean and Error String destinations, separate from the main Read data. Final Name and Final URI are String outputs meaningful for newly created files in Create mode, including conflict-renamed files. Read and Append return empty values for these two outputs. A URI is Android’s storage identifier, not an ordinary filesystem path.

Access depends on the provider and Android’s saved grants. Reselect the file or folder if access is lost. Text and JSON reads are capped at 256 KiB and can be truncated with a diagnostic. CSV reads above 1 MiB fail instead. Check Error when limits matter. Changing mode or format can clear outgoing settings; review the required fields afterward. This option tour closes without saving or playing.

Overview

Step-by-step guide

  1. Step 01

    File brings information into a script and saves results back to storage. It can read an existing file, create a file, or append data to the end of one. Use it for notes, tables, and JSON documents. This overview explains the options without running them.

    File: Overview step 1: File brings information into a script and saves results back to storage. It can read an existing file, create a file, or append data to the end of one. Use it for notes, tables, and JSON documents. This overview explains the options without running them.
  2. Step 02

    Drag File from Device into the script, then open the placed row. The Mode button cycles through Read, Create, and Append. Format chooses the kind of data within that mode.

    File: Overview step 2: Drag File from Device into the script, then open the placed row. The Mode button cycles through Read, Create, and Append. Format chooses the kind of data within that mode.
  3. Step 03

    Use In chooses whether output variables belong to This Script Only or the wider Script Thread. Choose the scope needed by the later commands that will use those results.

    File: Overview step 3: Use In chooses whether output variables belong to This Script Only or the wider Script Thread. Choose the scope needed by the later commands that will use those results.
  4. Step 04

    Read retrieves information without changing the file. With Text selected, use the folder icon beside File to choose an existing file through Android's file picker. Save Text names the String destination. The chosen storage provider must allow ScriptTap to read that file.

    File: Overview step 4: Read retrieves information without changing the file. With Text selected, use the folder icon beside File to choose an existing file through Android's file picker. Save Text names the String destination. The chosen storage provider must allow ScriptTap to read that file.
  5. Step 05

    JSON stores structured information. Read JSON loads the whole document as text into the String named in Save JSON. It does not extract a property by itself. Use the separate JSON command guide when later commands need particular fields or typed values.

    File: Overview step 5: JSON stores structured information. Read JSON loads the whole document as text into the String named in Save JSON. It does not extract a property by itself. Use the separate JSON command guide when later commands need particular fields or typed values.
  6. Step 06

    CSV means comma-separated values: a table of rows and columns. Choose CSV, then Read Cell to retrieve one cell into a String. Row and column numbers start at one. A header row still counts as a row, so the first data record is often row two.

    File: Overview step 6: CSV means comma-separated values: a table of rows and columns. Choose CSV, then Read Cell to retrieve one cell into a String. Row and column numbers start at one. A header row still counts as a row, so the first data record is often row two.
  7. Step 07

    Column can use a Number or a Header name. Header looks for that name in the first row, matching its capitalization after surrounding spaces are ignored. This is useful when a column's position might change. The Row field still identifies which record to read.

    File: Overview step 7: Column can use a Number or a Header name. Header looks for that name in the first row, matching its capitalization after surrounding spaces are ignored. This is useful when a column's position might change. The Row field still identifies which record to read.
  8. Step 08

    Read Row collects Count cells across, starting at the chosen row and column. Results go into consecutive String slots in the Array you name, beginning at Start. Enter the array's single letter, a one-based destination Start, and a positive Count. Keep that complete output range within the supported array capacity.

    File: Overview step 8: Read Row collects Count cells across, starting at the chosen row and column. Results go into consecutive String slots in the Array you name, beginning at Start. Enter the array's single letter, a one-based destination Start, and a positive Count. Keep that complete output range within the supported array capacity.
  9. Step 09

    Read Column goes down from the starting Row in the selected column. It uses the same Array, Start, and Count destination controls. When the requested range extends beyond available data, the remaining entries are empty Strings. Numeric positions and counts can also use earlier Integer variables.

    File: Overview step 9: Read Column goes down from the starting Row in the selected column. It uses the same Array, Start, and Count destination controls. When the requested range extends beyond available data, the remaining entries are empty Strings. Numeric positions and counts can also use earlier Integer variables.
  10. Step 10

    Switch Mode to Create to write a file in a selected Folder. This selects a destination folder, not an existing file. Name Source lets you enter a filename or take it from a String variable. Include the appropriate filename extension, and choose a folder that permits writing.

    File: Overview step 10: Switch Mode to Create to write a file in a selected Folder. This selects a destination folder, not an existing file. Name Source lets you enter a filename or take it from a String variable. Include the appropriate filename extension, and choose a folder that permits writing.
  11. Step 11

    For CSV creation, CSV text writes the table text supplied here. String array row instead builds one CSV row from existing String values selected by Array, Start, and Count. It quotes fields when needed, which is useful when values contain commas or quotation marks.

    File: Overview step 11: For CSV creation, CSV text writes the table text supplied here. String array row instead builds one CSV row from existing String values selected by Array, Start, and Count. It quotes fields when needed, which is useful when values contain commas or quotation marks.
  12. Step 12

    Create Text writes plain-text content. Content Source can use Text entered here or a String variable produced earlier. Use a variable to save a calculated result, a captured message, or other text generated by your script. Text is convenient for fixed content.

    File: Overview step 12: Create Text writes plain-text content. Content Source can use Text entered here or a String variable produced earlier. Use a variable to save a calculated result, a captured message, or other text generated by your script. Text is convenient for fixed content.
  13. Step 13

    If Exists controls filename conflicts. New Name keeps the existing file and chooses an unused name. Timestamp adds date and time; Number uses the lowest available positive number suffix. Overwrite replaces the existing file's contents, so select it only when that replacement is intentional.

    File: Overview step 13: If Exists controls filename conflicts. New Name keeps the existing file and chooses an unused name. Timestamp adds date and time; Number uses the lowest available positive number suffix. Overwrite replaces the existing file's contents, so select it only when that replacement is intentional.
  14. Step 14

    Create JSON writes a complete JSON document, either entered as text or supplied by a String variable. Prepare a correctly formed document first. The JSON command can build or transform that document; File then saves the resulting text to storage.

    File: Overview step 14: Create JSON writes a complete JSON document, either entered as text or supplied by a String variable. Prepare a correctly formed document first. The JSON command can build or transform that document; File then saves the resulting text to storage.
  15. Step 15

    Append adds data to the end of an existing writable file without replacing its previous contents. Select the file using its picker. Append supports Text and CSV, not JSON. For JSON updates, edit the document with the JSON command, then save the complete document using Create.

    File: Overview step 15: Append adds data to the end of an existing writable file without replacing its previous contents. Select the file using its picker. Append supports Text and CSV, not JSON. For JSON updates, edit the document with the JSON command, then save the complete document using Create.
  16. Step 16

    Text Source accepts entered Text or a String variable. Append as new line adds a line break after the appended text. It does not force a line break before it: if the old file ends mid-line, the new text begins right there. Turn it on when subsequent additions should start on another line.

    File: Overview step 16: Text Source accepts entered Text or a String variable. Append as new line adds a line break after the appended text. It does not force a line break before it: if the old file ends mid-line, the new text begins right there. Turn it on when subsequent additions should start on another line.
  17. Step 17

    CSV Append takes one valid CSV row from entered Text or a String variable. It parses that row and quotes fields as needed. This source is row text, rather than Create's array-row selector. Each appended CSV row ends with a line break.

    File: Overview step 17: CSV Append takes one valid CSV row from entered Text or a String variable. It parses that row and quotes fields as needed. This source is row text, rather than Create's array-row selector. Each appended CSV row ends with a line break.
  18. Step 18

    Create New Row controls the boundary before that CSV row. When on, it adds a missing line break after an unfinished existing row, keeping the new row separate. When off, appending starts directly at the existing end. Leave it on when you need reliably separated rows.

    File: Overview step 18: Create New Row controls the boundary before that CSV row. When on, it adds a missing line break after an unfinished existing row, keeping the new row separate. When off, appending starts directly at the existing end. Leave it on when you need reliably separated rows.
  19. Step 19

    Save Outputs reveals optional result information. Enable Success for a Boolean status and Error for a String diagnostic, each with its own destination. These describe the file operation; they are separate from the text, cell, or array data returned by Read. Choose only the outputs your script needs.

    File: Overview step 19: Save Outputs reveals optional result information. Enable Success for a Boolean status and Error for a String diagnostic, each with its own destination. These describe the file operation; they are separate from the text, cell, or array data returned by Read. Choose only the outputs your script needs.
  20. Step 20

    Final Name and Final URI are String outputs describing the newly created file in Create mode, including a changed name after a conflict. URI is Android's storage identifier, not an ordinary file path. Read and Append do not create a file, so these two outputs are empty in those modes.

    File: Overview step 20: Final Name and Final URI are String outputs describing the newly created file in Create mode, including a changed name after a conflict. URI is Android's storage identifier, not an ordinary file path. Read and Append do not create a file, so these two outputs are empty in those modes.
  21. Step 21

    File access depends on the selected provider and Android's saved access grants. Reselect the file or folder if access is lost. Text and JSON reads are capped at two hundred fifty-six kilobytes and can be truncated. CSV reads above one megabyte fail instead. Check Error when those limits matter.

    File: Overview step 21: File access depends on the selected provider and Android's saved access grants. Reselect the file or folder if access is lost. Text and JSON reads are capped at two hundred fifty-six kilobytes and can be truncated. CSV reads above one megabyte fail instead. Check Error when those limits matter.
  22. Step 22

    Changing a mode or format can clear its outgoing settings, so review the required fields afterward. This was an option tour: close without saving or playing. Choose a demonstration tab to see the shortest useful setup and the actual result for a particular File operation.

    File: Overview step 22: Changing a mode or format can clear its outgoing settings, so review the required fields afterward. This was an option tour: close without saving or playing. Choose a demonstration tab to see the shortest useful setup and the actual result for a particular File operation.