one-touch dir to copy output to editor

  • eNG1Ne

    eNG1Ne - 2013-10-03

    "Open current dir" is indeed a handy equivalent to !ls, but is there any one-click way/single command to run a dir command on the current directory and open the results in a N++ window? My [usual] apologies if I'm asking an obsolete question – still stuck with 5.8.5 on this corporate PC.

  • Jan Schreiber

    Jan Schreiber - 2013-10-03

    This is how I would do it with the NppExec plugin: Hit F6 for the NppExec prompt, make sure it says "temporary script" on the lower left, and type

        cmd /c CD "$(CURRENT_DIRECTORY)" && DIR > output.txt
        "C:\Programme\Notepad++\Notepad++.exe" "$(CURRENT_DIRECTORY)\output.txt"

    If everything works as expected, hit F6 again, click "Save" and save the snippet under some descriptive name. Optionally, add a keyboard shortcut via settings/keyboard.
    This has two minor drawbacks: (a) It will clutter your drive with output.txt files over time if you don't delete them. (b) Existing output.txt files will be overwritten without prompting.

    Last edit: Jan Schreiber 2013-10-03

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks