Menu

Relative Filename Paths in Save Session?

2009-06-25
2012-11-13
  • Carlton Rubio

    Carlton Rubio - 2009-06-25

    Hi All,
    I have been searching for this and have not come up with an answer (hopefully someone can help).  Love the program and use it for coding, but would love to save a notepad session similar to a project file. 

    That is, assume I store all files into a project x, and x is initially stored at "C:\oldcode\x", I then create a session which opens all relevant files and then save the session.  If I now move the project from its former location to say "C:\newcode\x", when I now open the session I see a blank environment.  When I look at a saved session file from the previous directory I see all of the files have full path names (and not relative ones like "..\x\code.c" or  "..\code.c"). 

    I tried editing the session file to add relative paths but no joy.  Also the session file in the new folder gets completely overwritten so no paths or filenames are seen.  If I had a copy of the project in the old folder then the saved session opens those files instead of the files in the new project.

    Anyone else try to do this? or run into this before?  Could this be a feature request?

    Thanks in Advance!
    Great Tool!

     
    • Carlton Rubio

      Carlton Rubio - 2009-07-07

      Agreed on IdeaTorrent (that was easy!) so I opened this idea (#33):
      https://sourceforge.net/apps/ideatorrent/notepad-plus/ideatorrent/idea/33/

      I did check the link you suggested (re: Project Management) and the concept is the same, but alas, so is the current result...projects/sessions are not very portable yet.

      The binary files issue is a good workaround and I will try it to see...

      Would like to look for the soft links apps you mention and will google around (but if you have any suggestions that would be appreciated).

      Thanks again for all the help (good talkin to ya!)

      Regards!
      Carlton

       
    • Carlton Rubio

      Carlton Rubio - 2009-07-10

      Hey Chris,
      I was trying to vote on my idea and others in IdeaTorrent, but every time I went back to the page the ideas I voted on were not updated...

      I saw the number change when I voted, yet it went back when I refreshed...I couldn't post to an administrator there, so I figured I'd ask you, any ideas? 
      Thanks
      Carlton

       
    • cchris

      cchris - 2009-07-10

      This issue affects all votes cast from July 2nd onward. I have seen this in the SF support timeline. Sorry about it, but I can't help it seems.

      CChris

       
    • cchris

      cchris - 2009-06-26

      There are easier ways:
      1/ Disable session remembering, and drag your project folder onto NP++ shortcu. This will work if the folder don't have binary files in them.
      2/ When moving, edit your session file, Replace All old path with new path, save session file under some other name than session.xml. Whn you close NP++, then rename that file if you wish.

      Perhaps one could add a "Find base folder for all open file" checkbox to the session management preferences. If checked, NP++ would store this information, plus the relative file paths to that base, instead of raw absolute paths. Try it on IdeaTorrent?

      CChris

       
    • Carlton Rubio

      Carlton Rubio - 2009-07-06

      Thanks Chris,
      Unfortunately there are binaries in the folder, so the first option won't work.  The second option could work, but it isn't optimal either (but the help was appreciated!).  

      I think for now I'll just recreate the folder structure each time I use the project I am editing with NP++ (or drag the source files into the NP++ editor window and recreate a new session).

      Finding the base folder sounds like a good workaround (in lieu of saving session file paths relatively), but I am not familiar with IdeaTorrent  so I don't understand your last response. 

      Well thanks again, and like I said before, Great Application!

       
    • cchris

      cchris - 2009-07-07

      IdeaTorrent: this a Sourceforge supplied forum-like tool which allows anyone to post ideas and solutions, and to vote on anyone's as well. See the Hosted Apps menu in the lower menu bar? Click there and check IdeaTorrent. The interface is pretty intuitive, I'd say.

      About projects: did you check http:/sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Project_Management ?

      About opening binary files when dragging a folder: yes, this is an issue, but you can use Windows... to select all buffers that have binary contents - hopefully they are all clustered together - and close them in a couple mouse clicks, then save session.

      Yet another trick: there are third party appps that provide soft links on any NTFS file system. A neat solution for any change of address, and your old session file would work the first time.

      CChris

       
    • cchris

      cchris - 2009-07-07

      I use HLM (Hard Link Magic). It is a free, rusty, russian, NT-style add-on that works just great under XP. I have no idea whether it is still available.

      CChris

       
MongoDB Logo MongoDB