Community
    • Login

    Save all opened files to change date ?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 4.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • panterorP
      panteror
      last edited by

      Hi,

      Is there a way to save all opened tab files even if i didn’t edited each file only to change the date of file ?
      The save all button save only edited files.

      Thank You.

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello Panteror,

        I’ve got a solution which implies a virtual search/replacement on all the opened files of a N++ session !

        • Open the replace dialog ( CTRL + H )

        • Check the Regular expression option ( IMPORTANT )

        • Find what : .\Z

        • Replace with : $0

        • Click on the Replace All in All Opened Documents button

        => At once, all the opened tabs will turn “red”

        • Hit the ALT + F4 shortcut or the menu option File - Exit

        • Press the Enter key, repeatedly, to valid the different save dialogs ( Save file C:\...... ? )

        Notes :

        • In the search regex .\Z :

          • The part . is a standard character, different from an End of Line character ( \r ) and ( \n ) and the Form Feed character ( \f )

          • The zero-width assertion \Z represents the very end of the file, possibly preceded by any range of End of Line character(s) ( \r and/or \n )

        • In replacement, this last standard character is just rewritten, as the regex $0 represents the entire matched regex, that is to say the last character itself !

        This method should not use much time to process : only one character per file X the amount of opened files, in N++ :-)

        Best regards,

        guy038

        P.S. :

        By the way, in a DOS console windows, you can change the modification and access date of a file or a set of them, without changing their contents, with the simple DOS command, below :

        copy name.txt + or copy *.txt + or, even, copy *.* + ( Tested on a Windows XP machine )

        The space, before the plus sign is not mandatory !

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors