File extension eg. .txt

2007-05-21
2012-11-13
1 2 > >> (Page 1 of 2)
  • Nobody/Anonymous

    Hi,

    i install and test notepad++ today for my first time (V 4.1.2). It looks and feel very nice. Good job!

    A simple problem:

    I want to save a simple .txt file. I opend the "save as..." menu and choose a filename (eg. "test"). Then i change below in the menu the file extension to .txt an save it. But everytime i do so, there is no extension on the saved file. The name of the file is only "test" without an extension...

    What is my mistake?

    Thanks for an answer...

     
    • Nobody/Anonymous

      There is NO .tpl support now... Nightmare... I want to save it as filename.tpl
      No chance! First, there is no .tpl in the dropdown, and even if i choose *.* it puts .txt at the end. So I have to change the .txt manually. Too many people here want this function. But for me this is the biggest bug in NP++

      And please, understand that .tpl means "template" which is almost pure .html
      So add a simple html colors to a .tpl files

      How is it possible?

      An advanced editor which does not know what a ".tpl" file is :O

       
    • Nobody/Anonymous

      Do you see any other .txt files? Is Windows set to hide known file extensions?

       
      • Nobody/Anonymous

        Hi,

        no, this is not the problem. I check this first. And if i save a text-filfe with the windows notepad, everything is ok. It must be a "problem" with notepad++. I install an test it in a vmware box...but i hope this is not the point...also, i test it with other extensions (e.g. .xml) and there is the same problem...

         
        • Nobody/Anonymous

          I dont understand is there is a work around or not. Using v 4.4.  Whenever I save a file it takes the first extension of the file type chosen in the drop down, no matter what I type.  For example, if I choose  HTML, it will only save as htm, even if I type file.html in the text box.  In my case I use different extension and would rather just type the extension in.  Is there a way to have it just take the full filename I tyoe and ignore the drop down?

          Thanks.
          RJL

           
      • Nobody/Anonymous

        If when saving, you type the filename with the extension in quotes, it will work

        Example: "filename.txt"

        I look forward to this being fixed in future releases.

        Aside from this, N++ is awesome.

         
        • Nobody/Anonymous

          I usually copy and paste the filename. Then, I have to type in .txt. Who wants to type in two more characters ("") and move the cursor around? If you can think of a way without more key strokes, let me know. They should fix the problem.

          Bob

           
    • MJG

      MJG - 2007-05-23

      The "Save as type:" field just filters the file list to display files of the indicated type.  For now, it doesn't check to see if a valid file type has been appended; it just writes the file with the explicit name given, without modification.

      Maybe in a later version.  --Joel

       
      • Nobody/Anonymous

        Joel,

        The functionality of "Save as Type:" isn't to 'validate the file' extension, nor is it to be used simply as a filter to see what else is in the directory.  If a user accidently types an existing file name, the system will ask re: replace. The actual function that more users use "Save as Type:" for is to append an extension.

        Since every single other application (not just text editors) operates correctly by adding the selected extensin, users have (like me) are forced to change habits for this one app (not easy to do when 100% of all other applications don't require this) or continuously do a "Save as..." and remember to redo it.

        My point being that while it isn't much 'harder' to type .php or .js onto the end of a filename while saving it than to go to the save as type drop-down, the habituation of users to other apps makes this big time annoying.

        But alas, since it took some major digging to even find this thread, I guess i am in the minority.

        Dave

         
        • Nobody/Anonymous

          I agree completely with this. N++ is a very very nice editor that I use daily and this is my major annoyance with it.

          With all respect, it doesn't sound very complicated to fix. All that it has to do is to check check after "Save As..." if there is a file extension entered after the file name, and if not, add the default extension for the document type.

          Thanks for an otherwise brilliant editor.

           
    • Nobody/Anonymous

      Hi,

      OK...thank's for this information. So, this is my first wish for a future function of n++.

      ;-)))

       
    • Nobody/Anonymous

      Yes, at the moment you have to type in the extension you want. It would be useful if it had the normal (or expected) functionality and saved the file as the type you select in the "Save as Type" list.

      Q: The number of extensions that would have to be offered would create a huge list, how can this problem be solved?

      A: You could limit the size of the list by only showing whats relevant to the currently selected language. E.g. If you were editing a document with the language set to HTML then when you go to save it, it shows HTML (.html) and Any File (.*). This stops the list of available extensions from being two pages long :). For user-defined languages, it could use the extension that has been associated with it and any type.

      On another note, why does N++ always seem to start at it's directory when you try to save something. Can it start wherever you saved the last file?

       
      • Nobody/Anonymous

        Why not put a default file type (like .txt) in preferences and have it be put in as the Save File as box? Or let people choose their 10 most used file extensions (in preferences) and then pick one. I can't believe that many people would use more than that many file types. Or, you could probably go to 20. This is off the top of my head and is a first impression. I'll think about it more and repost.

        Bob

         
    • Nobody/Anonymous

      Hi,

      i'm a regular user of N++, currently i'm using 3.7. i'm also wondering if i can set my default extension when saving. (save as). thanks!

       
      • Nobody/Anonymous

        Hi,

        I'm a regular user of NPP, currently using 4.1.2. This would be a time saving addition to NPP. I am wondering why it can't be added to NPP?

        Thanks.

         
        • Nobody/Anonymous

          Let's look at this from a programmer's perspective.
            1. You have a text box for the file name.
            2. You have a drop down list box for the extension.
            3. You enter the file name in the text box.
            4. You choose the extension from the the drop down list box.
            5. You click Save.
            6. The program concatenates (joins together) the file name and the extension into the final file name.
            7. The program SAVES the file with the new (concatenated) file name to disk.
            8. It's magic.
          This seems like pretty simple stuff. Why can't this be done?

           
          • Harry

            Harry - 2007-10-01

            Because GetSaveFileName (Win32 api) doesnt really specify any way to do this. According to the specifications, you can give a default extension (that gets appended when the user gives no extension) and a list of extensions the user can choose from, but nothing to retrieve what extension the user has chosen. This means that either the default gets appended (no solution here, you dont want to append .txt to a file that has to be .cpp) or nothing because the user doesnt type anything and selects something from the list.

            But, I jsut googled around on the matter and it seems that if you were to supply a dummy extension, GetSaveFileName actually DOES append the selected extension of no extension is given (if an extension is given, nothing is done), so the solution (here it comes Don) would probably be

            <snippet FileDialog.cpp>

            char * FileDialog::doSaveDlg()
            {
                _ofn.lpstrDefExt = "";  // Dummy default here
            ...
            fn = ::GetSaveFileName(&_ofn)?_fileName:NULL;
            ...
            _ofn.lpstrDefExt = NULL;  // No default extension
            }

            </snippet FileDialog.cpp>

            I tried and it seems to work.

             
            • Nobody/Anonymous

              i to would like to be able to choose a Save as type

               
            • Nobody/Anonymous

              I agree with you harrybharry, the explanation from one of the programmers, that the change would take a lot of work and code is simply rubbish! How you demonstrated here is it in no way complicated and one of the basic functions of every text editor. Thank for god it's open source, so we can hope that somebody will come on one day and completes the code at this point.

               
            • Nobody/Anonymous

              I wish to have Save as add default extension too.:)

               
    • Nobody/Anonymous

      I would like to see this implimented as well. You have no idea how many times
      I would love to be able to SET the default extension and filetype in options,
      but alas, I cant. I even select NORMAL TEXT FILE from the drop down list and
      no .txt is added. I pray that the developer adds this to Notepad++. It is much
      needed.

       
    • Nobody/Anonymous

      I want to thank whomever implemented the Save as functionality to Npp. It is a huge step forward to a great editor.

      BOB

       
    • Nobody/Anonymous

      I want to thank whomever added the functionality to the Save as Save dialog. It makes Npp a great editor.

      BOB

       
    • Nobody/Anonymous

      I also want to thank whomever did this long awaited work, but it seems that Don isn't content with the stuff and somebody else hast to finish it.

       
1 2 > >> (Page 1 of 2)