I can't open JS files in Windows from Filezilla

I had the same issue and fixed it by doing the following in Filezilla:

  1. Go to Edit > Settings
  2. Go to the 'File editing' section
  3. Under 'Default Editor': Ensure that Notepad++ is selected as your custom editor
  4. Change the radio button from 'Use filetype associations if available' to 'Always use default editor'

You say that you're right clicking and clicking "View/Edit", and it throws that error.

The error is occurring because Windows is executing the script, and the script has a problem (because it relies on another script being loaded).

So although you may be clicking "View/Edit", and expecting that this will open the file in Notepad++, what it is actually doing is assuming that "View" means "Run the script".

Clearly, Notepad++ is not the default action for this file type, or at least it isn't according to Filezilla. Maybe the default action isn't actually set the way you think it is, or maybe it's Filezilla that isn't respecting your default action.

The solutions:

  • If Filezilla has an option "Open with..." that allows you to pick the program to open the file with, then use that and select Notepad++ manually. Even better, if it has the option to then make that the default, then tick it, and the problem should be solved permanently.

  • Alternatively, just download the file to your local machine before trying to open it.


I got this working in FileZilla by doing the following: -

  1. Edit -> Settings
  2. File editing -> Use custom editor [file path to notepad ++] then
  3. |___File editing -> Filetype associations
  4. Adding the line -> js "C:\Program Files (x86)\Notepad++\notepad++.exe"
  5. Click OK to save changes

This will stop windows script host from attempting to run the file and open in notepad++.

While the question has effectively been identified previously in the post I hope that someone finds this 'how-to' useful.