No announcement yet.

How to use js format for all txt files in a folder

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use js format for all txt files in a folder

    I'm working on a project where javascript files must be named as xxx.txt, and cannot have double extensions like *.js.txt. This stupid requirement is imposed by the software consuming my project, I have no way to remove the requirement.

    Although every time I compare the working copy of the txt file with the one in index, I'm able to manually change the file format, is there a way for beyond compare to remember that in this particular path, all txt files are JavaScript files?

  • #2
    Yes, you can include relative path information in file format masks. Open the File Formats dialog from the Tools menu ("Beyond Compare" menu on macOS), select "JavaScript Source" from the list on the left, then edit the "Mask" field in the "General" tab on the right. The basic form is something simple like "folder\*.txt", but you can use any of the *, ?, or [a-z] wildcards within folder names, and you can use "..." as "zero or more subfolders" to indicate it should match recursively too. For example "folder\...\*.txt" would match "folder\a.txt" and "folder\subfolder\b.txt", while "folder\*.txt" would only match the first one.
    ZoŽ P Scooter Software