Announcement

Collapse
No announcement yet.

write to a file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • write to a file

    I have a file thats like this:

    5
    Hi
    Bye
    Just
    Testing
    Etc.
    the number 5 reflects on how many lines there are under the first line

    and I have a script that allows me to add more words to the list

    would it be possible to be able to read the first line of the file, take the number, and add 1 to it and insert it as the first row

    thanks,

    Dimava
    NXSupport Admin

  • #2
    hey Dim,

    sure you can. when you open the file to write just use the "w" instead of w+ that way it sets the pointer to the top of the file.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X