No announcement yet.

Find and replace within a file

  • Filter
  • Time
  • Show
Clear All
new posts

  • Find and replace within a file

    I am using SF

    I want to install a file on the users system, and I created the file in some source directory.
    The point is, I have to make some changes to the file dependant on the computer name and location.
    I know how to find the computer name and location, but how can I then find and replace some strings within that file ?


  • #2
    Re: Find and replace within a file

    Assuming that the file you are going to be modifying is essentially just composed of text, you could use some of the Text File actions such as "Find Text Line", "Get Text Line" "Insert Text Line" and "Delete Text Line". If needed you could then manipulate some text using some of the String actions. For example, get the text line, perform some string actions, delete the current text line and then reinsert the modified text line.

    Hope that helps.