Menu

#111 Replace text feature does not work with Windows PowerShell Scripts

None
closed
5
2020-11-20
2018-07-23
Anonymous
No

The replace text feature does not work with Windows PowerShell Script (.ps1) files. I have 100 poweshell scripts & I want to replace the database in my all scripts using FAR, but it does not work.

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2018-07-23

    Right click file name -->Select file 'Info' property--> Change file type from Binary to 'text/plain' --> Replace feature worked for me

     
  • Olivier Wehner

    Olivier Wehner - 2018-07-30
    • labels: --> file type, encoding
    • assigned_to: Olivier Wehner
    • Group: -->
     
  • Olivier Wehner

    Olivier Wehner - 2018-07-30

    Hi there,

    and thank you for your input. As you rightly noticed, FAR classifies .ps1 files als binary because it does not know this extension (yet).

    There is an easy was to tell FAR to treat all .ps1 files as text. This will spare you to redefine the file type manually for each file all over again:

    Open the settings menu via FAR > Settings and select the File Types tab.
    EITHER, add .ps1 to the file extension list of text/plain, hit Apply AND the Save button (in this order)
    OR hit the New Text Type button, enter an appropriate mime type in the name field, e.g. text/powershell and put .ps1 in the file extension list. Then press Add AND the Save button.

    Afterwards FAR will recognize the new File type and allow you to modify.

    Best regards,

    Olivier

     
  • Olivier Wehner

    Olivier Wehner - 2020-11-20
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB