Need Help Copying Dates Between Files With Same Name - Not one at a time

I am working with video dates. When videos are converted, dates are stripped.

Is there a way to copy a specific metadata field (or multiple) from source files to destination files with the same name?

I want to copy the file Created Date and the File Modified dates from the each original file to each corresponding converted file.
I can't use CopyMeta (CopyMeta (Copy metadata between files))
because CopyMeta copies metadata from only the first file in the Source to every file in the destination.
So I would need to do it one file at a time. That's not feasible when I routinely work with hundreds or thousands of files.
Also, the files must have the same extension when using CopyMeta.

Definitely Canadian ! :slight_smile:

I looked a little into the SetAttr internal command and did not find what you need.
I had thought of this kind of thing before, but have never had any real need of it.
The time stamp on a converted video may be best set at present day, but it is your project.

So, I wondered if there was an easy way to convert a very old video, perhaps one that has been cleaned up via Virtual Dub to temporally filter spots or whatever, and keep metadata intact.
I used a captured video in avi from when I was 4 years old at Xmas.
I added a metadata field of Genre using Directory Opus and named it 'Family'.

I used an old free program from a software fellow that I remember being in former Eastern Europe, Hungary. I think that's correct at least.

His programs haven't been updated in years, but I tried 'Super Simple Video Converter', which is free. I converted the avi to mp4. Dopus found the Genre field of the converted video to be 'Family'.

Super Simple Video Converter can easily batch convert as well.

Enumerate the video files in the current pane, if there is a file with the same name in the destination pane, copy the timestamp.

Wken,
Thank you, the original and converted files do have the same name, but not the same extension.
The question is: HOW can that be done by batch and not one file at a time?

David,
There are many applications for batch converting videos, but I need one that does not strip the dates.

Yes,
I understood that, but you also said,

My point was that part of it.

Test this script.

//Copy dates of the video file to the file with the same name in the destination pane
function OnClick(clickData)
{
	var func = clickData.func;
	var sourcetab = func.sourcetab;
    var dest = func.desttab.path + "";
	if (!sourcetab.lister.dual || sourcetab.path + "" == dest)
       return

	var cmd = func.command;
	cmd.deselect = false;

    // Add string trim() method
	String.prototype.trim = function(s){s=s||"\\s";return this.replace(new RegExp("^("+s+"){1,}\|("+s+"){1,}$","g"),"")}
	Dlg = func.Dlg;
	var ext = func.Dlg.GetString("Enter the extension of the destination pane", "mp4");
	if (ext) {
	    ext = ext.trim();
	} else {
	    Dlg.message = "No extension entered, script terminated!";
        Dlg.buttons = "&OK";
        Dlg.show
	    return
	}

    cmdLine = "";
	var fsu = DOpus.FSUtil;
	for (var e= new Enumerator(sourcetab.files); !e.atEnd(); e.moveNext() )
	{
	    eItem = e.item();
	    if (eItem.metadata == "video") {
		    modified = eItem.modify.Format('D#yyyy-MM-dd T#HH:mm:ss');
		    var basename = eItem.name_stem;
			var destItem = dest + "\\" + basename + "." + ext;
			if (fsu.Exists(destItem)) {
			    cmdLine = 1;
				cmd.AddLine('SetAttr "' + destItem + '" Meta "lastmodifieddate:' + modified + '"')
			}
	    }
    }
	if (cmdLine)
	    cmd.Run()
}