Transfer Creation DateTimes between Files


#1

Hi people,

Is there a way to copy the creation dates and times of a bunch of files to another bunch. I've tried the export function to a text file:

$filename(txt,utf-8)$loop(%_path%)%_file_create_datetime%
$loopend()

and to import from this *.txt to the new files, but that does not work, files dates and times didn't change.

I have three doubts:

1 - In the resulting export file order of times is given by filename, I changed %_path% with other parameters, and the result is sorted according to what is chosen, however I need a sort according to two or three parameters: Path, Album and Filename in this order. I make an emphasis on the fact, that no matter how is the files order or sort in the mp3Tag window, always I get the same result. The only case is the mentioned above, when I change the export file, but this only allow a unique parameter sort, not 2 or more...

2 - With the file resulting from the export, the import text>>tag didn't work, and the date didn't change...

3 - I would like to implant this, as an action, is there a way to do that, by making for example, a transfer from a specified folder to another, by default. This way it would be just a matter of placing files where correspond...

This is the idea, but still open to other possibilities, as always :wink:

Thank you...

N.B: As the *.txt export file, for example, I've tried with no success:

$filename(txt,utf-8)$loop(%_path%%_file_create_datetime%)%_file_create_datetime%
$loopend()


#2

No, there is no way within Mp3tag to copy a file date time attribute from one file to another file.
Such a file oriented task remains to the domain of file manager tools.
Maybe "Robocopy" or XXCOPY or "Total Commander" with "anytag" plugin can do it ...
http://en.wikipedia.org/wiki/Robocopy
http://www.xxcopy.com
http://en.wikipedia.org/wiki/Total_Commander

1: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Test.DateTime.txt',UTF-8)

2: $loop(%_path%)%_file_create_datetime%$char(9)%_path%
3: $loopend()

The file creation date time is an attribute of the file in the file system and will be managed by the file system itself.
Mp3tag can read this attribute from the file and provide this information to the user by a pseudo tag-field placeholder.
The pseudo tag-field %_file_create_datetime% or its content is not part of any tag data block.

Note: the pseudo tag-field placeholder %_path% includes the value of %_filename%.

%_path% is the same as %_folderpath%%_filename%.

The Mp3tag Export Scripting Language allows to create nested loops, for example ...

1: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Test.Export.txt',UTF-8)

2: $loop(%ARTIST%)$loop(%ALBUM%)$loop(%TRACK%)%ARTIST%' | '%ALBUM%' | '%TRACK%' | '%TITLE%' | '%_file_mod_datetime%' | '%_path%
3: $loopend()$loopend()$loopend()

The Mp3tag Export feature has its own rules of sorting.
Mp3tag export and listview areas are decoupled.
The report module get only the selected file names from the listview, nothing else.

You cannot change intentionally any date time attribute of the underlying file by the Mp3tag tag data import feature.

You can import any text data into a user defined tag-field, for example ....

Begin Action Group Test_2012#20121022.FileDateTimeToTagField

Action #1
Actiontype 5: Format value
Field ______: FILE_DT_MOD
Formatstring: %_file_mod_datetime%

Action #2
Actiontype 5: Format value
Field ______: FILE_DT_CREATE
Formatstring: %_file_create_datetime%
End Action Group Test_2012#20121022.FileDateTimeToTagField (2 Actions)

DD.20121022.0713.CEST
Edit.DD.20121022.1703.CEST


#3

Sorry for that, it's a functionality that might be interesting

Oh, that's it, I was erroneously thinking that it's the same as forcing columns order in the main mp3Tag window, now I know :rolleyes:

Yes, this way it's possible to manage times and dates as the content of a tag, however, searching I found this Windows based program "SetFileDate", that can change date and time and other attributes, but manually :unsure: . I'm experimenting with the 3 options you gave me to find an optimum way leading to reach objectives. However if this can be incorporated to mp3Tag, it will be useful, just as the preservation of modification date, while modifying tags... Just a suggestion to the developer, in road to reach perfection :smiley:

Thank you DetlevD for your help...


#4

You can try out the Mp3tag option "Preserve file modification time when saving tags".

For copying file date time attributes from one set of files to another set of files you have to use some other tool.

DD.20121023.0740.CEST


#5

That was what I was doing until now, but this just preserve modification date within changing tags, however for creation date, nothing mentioned... :huh:

Well, actually, I'm converting my files to other bitrates (to get lower sizes), for this reason I want to preserve creation date and time, as these are the real attributes, but modification attributes has to be those of the converted files. However, the converting tools that I use (nero, dppoweramp,...), only allow preserve the whole kit of attributes (and this in the best case; normally, they set the attributes to the ones corresponding to those of moment of conversion), and didn't allow choose creation, modification or accessed attributes as the attributes to preserve. For these reason, I was hoping that mp3Tag as versatile as it is, may has some function that can do that.

By now, and as you say DetlevD, it seems that I had to do this using other external tools, hope this may be included in future versions.

Thank you


#6

It's not wise to rely on file creation time for much of anything. Copying a file from one directory to another by dragging and dropping in Windows, for instance, will give the copied file a new creation time. It's very common for file creation times to be much later than last modified time.

If you want to give transcoded files the same last modified time as the originals, look for a tool that preserves them by copying the time from the original to the new file. If you're scripting something you can use a 'touch' program to copy the time.


#7

Hi JJ Johnson, your're right with the copying process, as this set a new creation attributes, however the original file, as far as I know, always preserve those attributes, no matter the processes you apply to it.

The problem with the accessed time, is that it's updated each time you access the file, even if this is done only to play it, so I can't rely on this attribute.

I'm afraid not to understand what you're meaning here !!! How can I do that ??

Thanks


#8

I'm sorry. I meant last modified time.

See if dbpoweramp has a means of preserving the timestamps when doing transcoding. I'm pretty sure it does. Ask in their forum if it's not obvious.


#9

Yes, it has, the problem is it preserve all three dates and times, also the basic attributes (hidden, read only,...), and no way to choose any individually, I'll continue searching

Thanks


#10

What's wrong with that? As long as it preserves the modified date. Creation and access dates are meaningless in any application that I've ever used. Is there some reason why you're working with with files with hidden/system/read-only attributes set?


#11

No, in my case, I need the creation DT to point to the attributes of the original file, when it was obtained for the 1st time, but the modification DT has to point to the attributes of the converted file. Access DT, by now, isn't too important...

It's a way to keep organized my playlists...


#12

Ok, you want the transcoded files to have a new modified time. So after transcoding them in dbpoweramp, which will copy all the timestamps, open the new files in Mp3tag and modify them all so that they'll then have an updated (current) modified time. I have an action group to do this which just adds a field and then removes it.

So we've come full circle... You were looking for a way in Mp3tag to accomplish what you wanted. In combination with using dbpoweramp's ability to copy the creation date, you now have it.


#13

Yes, almost we get it, but you say you have an action group to accomplish this, how is that? I'd like to maintain the status of the preserve modification DT in settings, and apply the changes in modification DT only when it correspond (by an action, as you say), I'd like to avoid tick and untick the preserve modification, each time I switch between files recently converted (that need an updated modification attributes), and files which I just modify tags (that I necessarily need to conserve modification DT). Any time, I may forget to tick or not the preserve in settings, and damn, files loose correct attributes. If there is an action that can avoid me this error, it will be welcomed...