Copy archive=.7z,single HERE?

I want to select multiple files and generate a .7z of each single file - not .zip.

A copy archive=.7z,single HERE ? doesn't work. ... Any other idea?

After that I want to rename all created .7z files (should be selected) with timestamps which should be command:
Rename PATTERN="*.7z" TO="*_{modified|D#yyyyMMddTT#HHmmss}.*" AUTORENAME TYPE=files

You could use 7-zip directly and put everything in one command line:

"%programfiles%\7-Zip\7z.exe" a "{filepath$|noext}_{date|yyyyMMdd}T{time|HHmmss}.7z" "{filepath$}"

The script here should do what you need, if you replace .ZIP with .7Z:

You could also modify it further to add the dates to the archive names and do everything in one go.

After reading Scripting Objects reference guide, and Date section, I'm still unable to add timestamp to Zip Single.dcf button.
I have to create an object, but I'm definitely fighting wrong way.

Added this:
var dat = DOpusFactory.Date
later when file is defined, added:
f.name_stem_m + dat.Format("D#yyyy-MM-dd T#HH:mm:ss") +".zip";

: are invalid characters for filenames.

But aside from that editor or script log complains with this:
'DOpusFactory' is undefined (0x800a1391)


var dat = DOpus.Create().Date();

instead of

var dat = DOpusFactory.Date

or create DOpusFactory:

var DOpusFactory = DOpus.Create();

Yep, works. Still I'm not there.

function OnClick(clickData)
	var source = clickData.func.sourcetab;
	var cmd    = clickData.func.command;
	var work   = false;
	var dat = DOpus.Create().Date();
	cmd.deselect = false; // Leave source files selected.

	for (var e = new Enumerator(source.selected); !e.atEnd(); e.moveNext())
		var f = e.item();

		if (IsEmptyDir(f))
			var arcName = f.Path + "\\" + f.name_stem_m + dat.Format("D#yyyy-MM-dd-T#HH-mm-ss") + ".zip"; 
// only .zip is created
			if (!DOpus.FSUtil.Exists(arcName))
				work = true;
				cmd.AddLine("CreateFolder NAME=\"" + arcName  + "\" ARCHIVE=.ZIP READAUTO=no NOUPDATESETTINGS");
			work = true;
			cmd.AddLine("Copy FILE=\"" + f.RealPath + "\" TO=\"" + f.Path + "\" ARCHIVE=.ZIP CREATEFOLDER=\"" + dat.Format("D#yyyy-MM-dd-T#HH-mm-ss") + ".zip\""); 
// IF PLACED HEREzip contains only timestamp, no selected filenames anymore

	if (work)

function IsEmptyDir(item)
	if (!item.is_dir)
		return false;

	var fe = DOpus.FSUtil.ReadDir(item.RealPath);

	return fe.complete;	

Or I get empty filename, or timestamp only. Guess in this heat my brains are melting and don't understand this piece.

In all modesty, I still like the one-liner from above:

"/programfiles\7-Zip\7z.exe" a -tzip "{filepath|noext|noterm}-{date|yyyy-MM-dd}-{time|HH-mm-ss}.zip" "{filepath}"

Or does the script have some magic I overlooked?

YAY, this works.
I did saw similar code from you, but when tried, encountered another error, and moved to big script solution.