Set file date & time?


#1

Is there any way in Mp3tag to set the date & time for the Date Modified (or created, or accessed) of files?

If not, would you consider adding such a capability? What I do now to accomplish this is to add a tag to a directory full of files, then remove the tag afterwards. This gives all files the same modified date & time. But it's always the current date & time rather than being more flexible.

One reason this would be helpful is that many music managers have the ability to list the most recently added albums or tracks, and usually they use the file's "date modified". When you use Mp3tag to correct a few tags, then the files get stamped with the current date & time and pushed to the top of "newest", when in fact the files might be quite old.

Another capability along these same lines would be to have the (optional) ability to maintain the date modified timestamp whenever Mp3tag updates a file. This is the behavior you see with FLAC when it encodes a WAV file - it maintains the same modified timestamp of the original file.


#2

Is there any way in Mp3tag to set the date & time for the Date Modified
(or created, or accessed) of files?
Attribute Changer
an excellent freeware utility for modifying files attributes/date+time stamps, for single files, folders and directory trees


#3

I won't add this feature, because every better file manager (like TotalCommander) can do this and there are a lot of freeware tools too, like aladoro is suggesting.

Preserve file modification time when saving tags at Options > General is the option you're looking for :slight_smile:

Best regards,
~ Florian :santa:


#4

Just because there are tools available to do a task doesn't mean that it wouldn't be a welcome addition to Mp3tag. The ability to do this while applying Mp3tag actions would be very powerful.

As a global option, it's not convenient to be able to selectively either preserve or not preserve the timestamps. As an Mp3tag action, however, you could easily choose to do so or not on a case-by-case basis.

Examples:

I need to fix a misspelling in a tag within a single track on an album, so I want to preserve the modification time in this case.

I'm tagging an entire album that I've just ripped. The file modification times, due to the time it takes to rip and encode each track, are a couple minutes apart. I'd like all tracks to have the same timestamp. Applying a tag change to all tracks in the album and permitting the modification time to change will accomplish this.

I'm tagging all tracks within a compilation album and want to make sure that when I'm done they all have the same timestamp. As I work through individual tags, setting different ARTIST tags for each track, the modification times will differ. When I'm finished, I wish to "touch" all files in the album to give them the same date & time. I can't apply an action which does nothing to change tags (for instance, updating ALBUM and making no change) because Mp3tag is smart enough not to rewrite files when no real tag changes are made. So I have to change a tag, then change it back, or else add a tag and then remove it. A simple action to update the file modification times would make this a much simpler task.


#5

Hi All,

I'd also like MP3tag to be able to change date and time stamps and or the archive attributes. Two/ three reasons why:

One. Changed FLAC tags are not seen as a changed file by my backup software and therefore files with tag modifications are not backed up.

Two. Some times I rip a CD but I do not want it to appear as 'new' music' eg in squeezeserver. To achieve this I change the time stamp to a time way back.

Both of the above can be done with free utilities. Which brings me to the third reason.

Three. I am using Bulk file changer to do the above and I added it to the tools section of MP3tag. I can open BatchFileRenamer from within MP3Tag and then I have to drag all my files over to the newly opened window. From there I can either change the files archive attributes or just add 5secs to the time stamps. After that when I backup the files are seen as changed. It works but it is not a very neat way to do it. I'd like something more automatic as an option in MP3Tag.

If there will be no plans to add such a feature can you guys please recommend me a utility that integrates better in MP3tag tools? I was thinking of something that calls the utility and can take commands to run pre-setup profiles.

eg Run:
BatchFileRename. exe " set A attribute"
BatchFileRename. exe " add 5sec to time stamp"
etc

Thanks, mark


#6

Mark, in my experience the archive attribute is always set when Mp3tag writes a file, even when the size and the modified time are not changed.

PM me for a tool I wrote in VBScript to bump the modified time.


#7

Does this workflow behave well together with the Mp3tag Undo feature?

DD.20111122.1535.CET


#8

I haven't tried it.

JJ was right though about the archive attribute, of course. It is changed. When I checked I found my backup software was not looking at the A attribute. It is now.

Thanks JJ


#9

I'd still love to be able to do this from an Mp3tag action. Perhaps a %_modtime% field and DateAdd() function capable of modifying the field. Then you could do something like the following to add two seconds to the date modified.

Action type: Format value
Field: _MODTIME
Format string: $dateadd(%_modtime%,"s",2)

You could also have a simpler way to timestamp to the current time than writing and deleting dummy fields.

Action type: Format value
Field: _MODTIME
Format string: $now()


#10

it seems using the archive attribute is not as simple as it should be.. windows file ownership issues and or linux way of working.

Now i find that for some files my backup software cannot reset the archive attribute and neither can I when I manually try with full admin rights! I get access denied. My flacs seem OK but some other files are not so they get repeatedly backed up. So, I may need another way to identify changed tag files and back them up and one that avoids the A attribute. its never simple is it!

my work around for now is to either backup music files separately and get the backup software to look for changes in the a attribute. For other files the backup software can be configured to use other methdos for spotting changed files. Or manually change the time stamps of any files modified by mp3tag. Its not a universal solution but both ways should work.


#11

After some discussion its been pointed out to me that mp3tag must be manipulating the time stamps so that tag updates do not change them; covering its tracks so to speak. If that is correct could mp3tag be made to not quite cover its tracks so perfectly and allow, say a few secs, changes to the time stamps instead. That way backup software would be able pick up the file as changed and music servers would not then see the affected music file as a very new file recently added to a collection.


#12

Try changing the setting about modification time in Mp3tag options/Tags.

DD.20111123.1032.CET

See also ...
/t/10277/1

DD.20111123.1714.CET


#13

I am work right now lol and I have not seen that setting before. Wouldn't it mean that a file that has tags updated then takes on the current time? Would that file then appear as a new file to a music server or am I getting confused with how creation and modified time stamps are utilised... will test tonight