Replace timestamps in a notepad++ file

0

I have these GPX files that I want to change the time in, and I'm not sure how to automate it.

    <time>2018-10-25T18:00:00Z</time>
    <time>2018-10-25T18:02:24Z</time>
    <time>2018-10-25T18:03:35Z</time>

There are about 70 of these lines in every file and about 25 files. Currently, the total timespan is 1 hour and 26 minutes but I want to make it shorter, 26 minutes long. I figured that I could use the replace function in notepad++ but I'm not very proficient in coding, and so I'm not sure how to automate this otherwise tedious process.

Currently the first line of code says <time>2018-10-25T18:00:00Z</time> and the last one says <time>2018-10-25T19:27:28Z</time>, and there are 70 lines in between. I would like to make so that I can change the last line to <time>2018-10-25T18:26:00Z</time>and change all the ones in between so that they fit accordingly.

Axel Karlsson

Posted 2018-12-18T19:50:53.940

Reputation: 1

Could you give an example of what you wish to change the times to? Use the EDIT button to add this to your question. – music2myear – 2018-12-18T20:01:11.990

NP++ is not really the tool for this, but see this answer. It's comparatively easy to do in LInux, so you should investigate Windows ports of bash, date and sed. You can use WSL on Windows 10, or CygWin on most Windows versions. You can also find individual ports, bash.exe, date.exe and sed.exe.

– AFH – 2018-12-18T20:24:16.023

Okay, I will investigate. Thank you again for helping me out! – Axel Karlsson – 2018-12-18T20:45:42.690

No answers