How to copy "created" datestamp to "modified" of files - but not by hand?

Long story short - in my new configuration of Mp3ag I forgot to select select the box for

Options > Tags > Tags > Preserve file modification time when saving files

And so I need to restore in over 500 files their previous Modified "attribute" [as my meticulous naming and tagging system requires it]. I know I can either do it one-by-one by hand using for example BulkFileChanger. i do not mind the hand-by-hand part - but doing it in a totally manual way would mean that I would have to first check the Modified dates on them [over 500 times]

So does anyone know a way to automatically copy Created over Modified? And in a quick / easy way

Some kind of software or BAT / PS1 script that would allow me just to drag and drop selected file and click an option for it or right click it for choosing some entry from its shell menu?

Using the file modification time is a really bad practice. I highly suggest you to change your process.

Yes, in Powershell you get the various attributes and timestamps with:
$file = Get-Item C:\temp\YourFileName.mp3

then you got three timestamps:


You can assign the timestamp .creationtime to a variable like
$MyCreationTime = $file.creationtime
and then assign the content of this variable back to your file with
$file.lastaccesstime = $MyCreationTime
$file.lastwritetime = $MyCreationTime

Now you have only to create a Powershell-Script which accept your selected files or do the above for the content of an entire folder or even recursive.

If you want to check the three timestamps, you can use:
Get-Item C:\temp\YourFileName.mp3 | select name, *time
If you want to check all the six timestamps (inluding the one in UTC), you can use:
Get-Item C:\temp\YourFileName.mp3 | select name, *time*

1 Like

If you really want to copy the timestamp .CreationTime from your existing files to the timestamp .LastWriteTime ("Modified"/"Geändert") then you can use this Powershell one line command:

Get-ChildItem 'C:\Temp\Folder with files to modify\' *.mp3 -recurse | ForEach-Object{$_.LastWriteTime = $_.CreationTime}

This would change all your *.mp3 .LastWriteTime timestamps recursively, starting from C:\Temp\Folder with files to modify\
Please test it carefully and create backups of your files before you mass change them.

1 Like

Well this works. My localized version would be

Get-ChildItem 'C:\Users\YOUR-USER-NAME\Documents' *.flac -recurse | ForEach-Object{$.LastWriteTime = $.CreationTime}

But this has a caveat: I cannot copy the affected files to [in this case] C:\Users\YOUR-USER-NAME\Documents because this will change their creation date. So I would have to work on the very affected files without backup copies [unless I would make an image of the drive]. And also I would have to open the folders with those files [still around 500], then copy this PS1 to every such folder and then run the srcipt it and delete it afterwards. Which adds up to thousands of by-hand operations

And so I tried coming up with an Action. I tried some variations of

Format value
Format string: %_file_create_datetime_raw%

but failed at seeing any changes

And then I checked the aforementioned by me BulkFileChanger. And there it was tight under my nose- an option for easy coping of data

And so I just sorted all of my files by %_FILE_MOD_DATE% in Mp3tag, selected them, drag & dropped them to BulkFileChanger and executed the tested operation. And that was it

So thank you

We have now two working solution to this problem - although I doubt there are many user who would deem various versions of dates of files as an issue at all