Community
    • 登入

    Ability to set session snapshot and period backup directory in NotePad++

    已排程 已置頂 已鎖定 已移動 General Discussion
    4 貼文 3 Posters 4.9k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • SundayFundayS
      SundayFunday
      最後由 SundayFunday 編輯

      Is there a way to set the snapshot and period backup directory (Settings -> Preferences -> Backup)?

      Currently, it is set to:
      C:\Users\<USER>\AppData\Roaming\Notepad++\backup\

      I am wanting to set it to my OneDrive folder because of a recent incident which caused my computer to be reimaged. I had notepad++ tabs that were not saved and those files ended up being lost. I am thinking that if the location of the default backup is set to OneDrive then this could have been prevented.

      1 條回覆 最後回覆 回覆 引用 1
      • cipher-1024C
        cipher-1024
        最後由 編輯

        OK this isn’t as dumb of a question as I thought :) I always assumed you could edit the Backup Path, but I can’t on my machine. I couldn’t find the path string stored in any of the notepad directories either. Maybe someone will come along with an answer but if not, I thought you could easily add that directory to your OneDrive sync. From the numerous angry comments in this thread on the OneDrive support site, that’s not easy either. However there was one post that said you could add a directory to your OneDrive this way:

        *A Workaround easiest, although it would be a useful feature.
        Find the Address of the folder you want to be synced. (ie. C:\Games). Copy it.

        Find the OneDrive location you wish for it to sync to. Hold shift and right click. On the context menu, click open command window here. In it type “mklink /j “YourCustomFolderName” “Address of Location(i.e. C:\Games)””, without the outer punctuation marks.

        This is like a shortcut that tells any programs that look there to look at another directory.
        This will sync anything inside the address you tell it to the folder created in a onedrive directory.*

        I don’t know if that works, I don’t use OneDrive, but you can try it out if you’re feeling adventurous. You can always just delete the link if it doesn’t work.

        1 條回覆 最後回覆 回覆 引用 0
        • Claudia FrankC
          Claudia Frank
          最後由 編輯

          This is from memory from the last time I’ve tested it.
          Afaik you have 4 possible ways to get this working (all with pro and cons)

          1. Use the custom backup directory from settings->preferences->backup,
            but this only useful if you save files, “new X” files will not be backed up.

          2. Use settings->preferences->cloud setting
            but this will store everything user related to notepad++ in the cloud, basically it creates
            C:\Users<USER>\AppData\Roaming\Notepad++ as E:\Notepad++ (E: supposed to be the OneDrive letter)

          3. As @cipher-1024 already pointed out use links to redirect a directory.
            mklink provides, afaik, hard links, junctions and soft links.
            Hard links, as of specification, can only be created on the same volume
            Junctions (NTFS only) can be create over different volumes
            Soft links, as junctions, but can also refer to network locations like smb (not to be confused
            with drives locally mapped like my E: example)

          4. Having a program/script like rsync (not sure if this exists on windows) which automatically syncs
            the folders.

          Cheers
          Claudia

          1 條回覆 最後回覆 回覆 引用 2
          • SundayFundayS
            SundayFunday
            最後由 編輯

            Thank you! Option 2 is what I was looking for!

            1 條回覆 最後回覆 回覆 引用 1
            • 第一個貼文
              最後的貼文
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors