After:
src.nif
target1.nif contents of src.nif
targetb.nif contents of src.nif
targetsefee.nif contents of src.nif
Is there already something that can do this?
Edit:
I just made a button with this command Copy c:\test\src.nif {allfilepath} and I also tried {filepath} . Didn't work. The error: An error occurred copying 'Quick': the system cannot find the file specified. I also tried with the full path of the destination, same problem
Copy "src.nif" WHENEXISTS=replace HERE AS="target1.nif"
Copy "src.nif" WHENEXISTS=replace HERE AS="targetb.nif"
Copy "src.nif" WHENEXISTS=replace HERE AS="targetsefee.nif"
That will replace the three files without confirmation, so be careful.
You could add a line with @confirm on it if you want confirmation.
(Or remove the WHENEXISTS=replace, but then you'd be prompted three times instead of just once.)
That's what I would do if you need it to work like that. (There is a way you could do it without a script, but I don't think it would be a good solution vs a script.)
Using a script also makes it easier to make this work with files selected in sub-folders via Expandable Folders / Flat View / etc.
Something like this should do what you want:
function OnClick(clickData)
{
var srcFile = "src.nif";
var cmd = clickData.func.command;
// cmd.deselect = false;
for (var eSel = new Enumerator(clickData.func.sourcetab.selected_files); !eSel.atEnd(); eSel.moveNext())
{
var item = eSel.item();
if (item.name == srcFile)
continue; // Don't try to copy srcFile over itself.
var cmdLine = 'Copy "' + srcFile + '" TO="' + item.Path + '" AS="' + item.Name + '" WHENEXISTS=replace';
// DOpus.Output(cmdLine);
cmd.AddLine(cmdLine);
}
if (cmd.linecount > 0)
cmd.Run();
}
Well that still throws errors.
Here is the actual code of the button
Copy C:\test\cap.nif WHENEXISTS=replace HERE AS "\\AMD\QuadTB\Quick Configuration v1.8.4h1 - Portable-546-1-8-4h1-1600638167\mods\caps_plants\meshes\landscape\plants\tatoplant01.nif"
without qoutes
Copy C:\test\cap.nif WHENEXISTS=replace HERE AS \\AMD\QuadTB\Quick Configuration v1.8.4h1 - Portable-546-1-8-4h1-1600638167\mods\caps_plants\meshes\landscape\plants\tatoplant01.nif