Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open a group of files from txt using notepad++

Tags:

notepad++

For example, I've saved some links in list.txt:

d:\phpnow\htdocs\pm\includes\templates\slucky\common\tpl_gallery_display.php
d:\phpnow\htdocs\pm\includes\templates\slucky\common\tpl_main_page.php
d:\phpnow\htdocs\pm\includes\templates\slucky\templates\tpl_main_page.php
d:\phpnow\htdocs\pm\includes\templates\slucky\templates\tpl_product_info_display.php
d:\phpnow\htdocs\pm\includes\templates\slucky\templates\tpl_product_info_display2.php

I want to open them all in notepad++. Is there any plugin to do the job?

like image 605
linjuming Avatar asked Jan 28 '13 03:01

linjuming


4 Answers

I used Git Bash so that I could pipe the results of find into Notepad++:

find . -type f -name "*.csproj" | xargs "C:\Program Files\Notepad++\notepad++.exe"

like image 169
TamaMcGlinn Avatar answered Oct 21 '22 12:10

TamaMcGlinn


Create a session file:

    <NotepadPlus>
        <Session>
            <mainView>
                <File filename="PATH_TO_FILE_1"/>
                <File filename="PATH_TO_FILE_2"/>
                <File filename="PATH_TO_FILE_#"/>
            </mainView>
        </Session>
    </NotepadPlus>

load it: File->Load Session...

like image 33
walktheweb Avatar answered Oct 21 '22 12:10

walktheweb


Write a batch File called openfromfiles.bat and execute it.

@echo off
setlocal enableextensions enabledelayedexpansion

set LIST=
for /f %%x in (list.txt) do (
    set LIST=!LIST! "%%x"
    )
    echo %LIST%

"C:\Program Files\Notepad++\notepad++" %LIST%

here is the link for explanation of the batch file.. Windows XP batch file concat

like image 29
Raghavan Avatar answered Oct 21 '22 12:10

Raghavan


You do not need a new plugin. You can do that using command line and you have to give all files separated by space as command line arguments. You can find this detail from NotePad++ documentation. You can create a bat file for executing the command.

E.g:

<PATH_TO_NOTE_PAD++_FOLDER>/NotePad++.exe "PATH_TO_FILE_1" "PATH_TO_FILE2"
like image 34
Manjula Avatar answered Oct 21 '22 10:10

Manjula